ZConfig.components.logger.tests.test_logger.TestReopeningLogfilesBase.test_filehandler_reopen() fails

Bug #930715 reported by Arfrever Frehtes Taifersar Arahesis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ZConfig
Fix Released
Low
Unassigned

Bug Description

ZConfig.components.logger.tests.test_logger.TestReopeningLogfilesBase.test_filehandler_reopen() fails. I use ZConfig 2.9.1, but this problem occurs also with some older versions.

$ nosetests-2.7
.........................E.....................................................................................................................................................
======================================================================
ERROR: test_filehandler_reopen (ZConfig.components.logger.tests.test_logger.TestReopeningLogfilesBase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/ZConfig-2.9.1/ZConfig/components/logger/tests/test_logger.py", line 439, in test_filehandler_reopen
    h = self.handler_factory(fn)
AttributeError: 'TestReopeningLogfilesBase' object has no attribute 'handler_factory'

----------------------------------------------------------------------
Ran 175 tests in 0.977s

FAILED (errors=1)

I'm attaching the patch, which seems to work.

Revision history for this message
Arfrever Frehtes Taifersar Arahesis (arfrever-fta) wrote :
Revision history for this message
Fred Drake (fdrake) wrote :

This is a problem with test discovery, not the tests themselves.

Because nose is just guessing what tests to run based on the classes,
it's getting it wrong; the "Base" at the end of the class name hints at
that.

I'll refactor so nose doesn't think TestReopeningLogfilesBase is a
test class.

Revision history for this message
Fred Drake (fdrake) wrote :

Refactored the test classes to avoid this discovery problem in r124378, r124379.

Released ZConfig 2.9.2 (tagged in r124381).

Changed in zconfig:
status: New → Fix Released
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.