[Zope-dev] testSetupServers() in Zope-2_7-branch?

Tim Peters tim at zope.com
Fri Oct 3 18:06:32 EDT 2003


======================================================================
ERROR: testSetupServers (Zope.Startup.tests.testStarter.ZopeStarterTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"C:\Code\Zope-2_7-branch\lib/python\Zope\Startup\tests\testStarter.py", line
194, in testSetupServers
    self.assertRaises(ZConfig.ConfigurationError, starter.setupServers)
  File "C:\PYTHON23\lib\unittest.py", line 289, in failUnlessRaises
    callableObj(*args, **kwargs)
  File "C:\Code\Zope-2_7-branch\lib/python\Zope\Startup\__init__.py", line
187,in setupServers
    servers.append(server.create())
  File "C:\Code\Zope-2_7-branch\lib/python\ZServer\datatypes.py", line 93,
in cr
eate
    logger_object=access_logger)
  File "C:\Code\Zope-2_7-branch\lib/python\ZServer\FTPServer.py", line 600,
in __init__
    ftp_server.__init__(self, None, *args, **kw)
  File "C:\Code\Zope-2_7-branch\lib/python\ZServer\medusa\ftp_server.py",
line 727, in __init__
    self.bind ((self.ip, self.port))
  File "C:\PYTHON23\lib\asyncore.py", line 300, in bind
    return self.socket.bind(addr)
  File "<string>", line 1, in bind
TypeError: an integer is required



That was on Windows & Python 2.3.2, but I don't know whether it matters.

The second half of testSetupServers() appears to be setting up an error
case, but it's not dying in the way the test expects.  Instead

   self.ip == '18092 # conflict'

and

   self.port == None

and socket.bind has no idea what to make of that.  It raises TypeError.  The
test is expecting ZConfig.ConfigurationError.  I figure someone can figure
this out faster than I can -- don't be shy <wink>.




More information about the Zope-Dev mailing list