bobber6467 / python-nose

Automatically exported from code.google.com/p/python-nose
0 stars 0 forks source link

Nose 0.10.0 breaks on multiple tests #131

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. Test runs OK by itself 

$ nosetests --verbose -a tags=buildbot --with-isolation --stop
--exclude=TestClientCheckableDirModel.py UnitTests/TestAccount.py
test creating an empty account object ... ok
We have to do a boootstrap to have something to load ... 2007-11-07
07:48:44,317 update_schema        DEBUG start
2007-11-07 07:48:44,317 update_schema        DEBUG Nos schema updates
directory, ignoring
ok

----------------------------------------------------------------------
Ran 2 tests in 1.876s

OK

2. When two tests are run the test aborts in setup_module() (these worked
in 0.9.0)

$ nosetests --verbose -a tags=buildbot --with-isolation --stop
--exclude=TestClientCheckableDirModel.py UnitTests/TestAccount.py
UnitTests/TestLRUCache.py
ERROR

======================================================================
ERROR: test suite for <module 'UnitTests.TestAccount' from
'/Users/dougfort/rhinogig/spideroak_tss/UnitTests/TestAccount.pyc'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/n
ose-0.10.0-py2.5.egg/nose/suite.py",
line 148, in run
    self.setUp()
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/n
ose-0.10.0-py2.5.egg/nose/suite.py",
line 196, in setUp
    self.setupContext(ancestor)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/n
ose-0.10.0-py2.5.egg/nose/suite.py",
line 219, in setupContext
    try_run(context, names)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/n
ose-0.10.0-py2.5.egg/nose/util.py",
line 377, in try_run
    return func()
  File "/Users/dougfort/rhinogig/spideroak_tss/UnitTests/TestAccount.py",
line 64, in setup_module
    serial.register_all()
  File "/Users/dougfort/rhinogig/spideroak_tss/Pandora/serial.py", line 73,
in register_all
    register(clas)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/c
erealizer/__init__.py",
line 499, in register
    if not _configurable: raise StandardError("Cannot register new classes
after freeze_configuration has been called!")
StandardError: Cannot register new classes after freeze_configuration has
been called!

----------------------------------------------------------------------
Ran 0 tests in 0.077s

FAILED (errors=1)
$ 

What I think is happening is that nose 0.10.0 is calling setup_module()
when it loads the test, whereas nose 0.9.0 was calling it before it ran the
test. This breaks all our tests.

Original issue reported on code.google.com by Doug.Fort on 7 Nov 2007 at 12:58

GoogleCodeExporter commented 8 years ago
If you could attach a simplified example that shows this error, that would be 
very
helpful in tracking it down. I suspect that the problem is actually in the 
isolation
plugin, also, so can you explain why you're using it and if you get any 
different
results without it?

Original comment by jpelle...@gmail.com on 7 Nov 2007 at 3:12