Issue #1197 resolved

test_states:ServerStateTests.test_4_Autoreload depends on other tests

Jason R. Coombs
created an issue

The test_4_Autoreload appears to depend on state from other tests in test_states. If I run the test_4_Autoreload by itself, I get this error:

[env] PS C:\Users\jaraco\projects\public\cherrypy> nosetests -s -v -x cherrypy.test.test_states:ServerStateTests.test_4_Autoreload
test_4_Autoreload (cherrypy.test.test_states.ServerStateTests) ... ERROR

ERROR: test_4_Autoreload (cherrypy.test.test_states.ServerStateTests)
Traceback (most recent call last):
  File "C:\Users\jaraco\projects\public\cherrypy\cherrypy\test\",
line 251, in test_4_Autoreload
  File "C:\Users\jaraco\projects\public\cherrypy\cherrypy\test\", line
438, in start
    cherrypy._cpserver.wait_for_free_port(, self.port)
  File "C:\Users\jaraco\projects\public\cherrypy\cherrypy\process\", line 412, in wait_for_free_port
    raise IOError("Port %r not free on %r" % (port, host))
IOError: Port 54583 not free on ''
-------------------- >> begin captured logging << --------------------
cherrypy.error: INFO: [26/Dec/2012:07:41:25] ENGINE Listening for SIGTERM.
cherrypy.test.helper: INFO: Python version used to run this test script: 2.7.3
cherrypy.test.helper: INFO: CherryPy version: 3.2.2
cherrypy.test.helper: INFO: HTTP server version: HTTP/1.1
cherrypy.test.helper: INFO: PID: 3444
cherrypy.error: INFO: [26/Dec/2012:07:41:25] ENGINE Bus STARTING
cherrypy.error: ERROR: [26/Dec/2012:07:41:25] ENGINE Set handler for console events.
cherrypy.error: INFO: [26/Dec/2012:07:41:25] ENGINE Started monitor thread '_TimeoutMonitor'.
cherrypy.error: INFO: [26/Dec/2012:07:41:25] ENGINE Serving on
cherrypy.error: INFO: [26/Dec/2012:07:41:25] ENGINE Bus STARTED
--------------------- >> end captured logging << ---------------------

Ran 1 test in 5.844s

FAILED (errors=1)

But if I run the whole module, the code at least gets past the check for the occupied port.

[env] PS C:\Users\jaraco\projects\public\cherrypy> nosetests -s -v -x cherrypy.test.test_states:ServerStateTests

Comments (2)

  1. Log in to comment