Open GoogleCodeExporter opened 8 years ago
Hm, it looks like you have a custom test runner. What code is in bin/run-tests
and what plugins are in addplugins= ?
Original comment by kumar.mcmillan
on 2 Aug 2011 at 8:02
Tim, do you have any ideas on this?
Original comment by kumar.mcmillan
on 2 Aug 2011 at 8:03
Which version of coverage do you use ?!
Original comment by timothee...@gmail.com
on 2 Aug 2011 at 8:10
There is nothing much in bin/run-tests. bin/run-tests just adds some modules to
the python path and calls the main() method in tests.run
(http://code.google.com/p/soc/source/browse/tests/run.py). The plugin is to
clear our Appengine datastore automatically after the completion of every test.
Original comment by praveen9...@gmail.com
on 2 Aug 2011 at 8:15
It seems you are using an old version of coverage. I encourage you to use the
latest version if you can.
I made a fix to avoid this error when using old coverage module.
But I think we should drop coverage < 3.0.
Original comment by timothee...@gmail.com
on 2 Aug 2011 at 8:59
Attachments:
Thanks for the help Tim. We were using coverage 2.85 which was added to our
testing system 2 years back and was not updated afterwards. We will be now
switching to the latest one i.e. coverage 3.5.
Thanks once again.
Praveen
Original comment by praveen9...@gmail.com
on 3 Aug 2011 at 4:39
It seems that coverage 3.5 doesn't work, either :-). I got the following error
instead. It looks like the same problem [0] appeared again. Any ideas? Thanks
in advance.
[0] https://github.com/cmheisel/nose-xcover/pull/7
Traceback (most recent call last):
File "bin/run-tests", line 43, in <module>
tests.run.main()
File "/Users/Tiger/Src/Projects/melange/experimental2/hg/tests/run.py", line 174, in main
nose.main(addplugins=plugins)
File "/Users/Tiger/Src/Projects/melange/experimental2/hg/eggs/nose-1.1.2-py2.5.egg/nose/core.py", line 118, in __init__
**extra_args)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/unittest.py", line 768, in __init__
self.runTests()
File "/Users/Tiger/Src/Projects/melange/experimental2/hg/eggs/nose-1.1.2-py2.5.egg/nose/core.py", line 197, in runTests
result = self.testRunner.run(self.test)
File "/Users/Tiger/Src/Projects/melange/experimental2/hg/eggs/nose-1.1.2-py2.5.egg/nose/core.py", line 63, in run
result.printErrors()
File "/Users/Tiger/Src/Projects/melange/experimental2/hg/eggs/nose-1.1.2-py2.5.egg/nose/result.py", line 110, in printErrors
self.config.plugins.report(self.stream)
File "/Users/Tiger/Src/Projects/melange/experimental2/hg/eggs/nose-1.1.2-py2.5.egg/nose/plugins/manager.py", line 94, in __call__
return self.call(*arg, **kw)
File "/Users/Tiger/Src/Projects/melange/experimental2/hg/eggs/nose-1.1.2-py2.5.egg/nose/plugins/manager.py", line 162, in simple
result = meth(*arg, **kw)
File "/Users/Tiger/Src/Projects/melange/experimental2/hg/eggs/nose-1.1.2-py2.5.egg/nose/plugins/cover.py", line 166, in report
self.coverInstance.stop()
File "/Users/Tiger/Src/Projects/melange/experimental2/hg/thirdparty/coverage/coverage/control.py", line 387, in stop
self.collector.stop()
File "/Users/Tiger/Src/Projects/melange/experimental2/hg/thirdparty/coverage/coverage/collector.py", line 246, in stop
assert self._collectors[-1] is self
AssertionError
Exception exceptions.AttributeError: "'NoneType' object has no attribute
'path'" in <bound method Signal._remove_receiver of
<django.dispatch.dispatcher.Signal object at 0x20eeb30>> ignored
Original comment by hiddenpy...@googlemail.com
on 3 Aug 2011 at 10:10
Are use using xcoverage here ?
Original comment by timothee...@gmail.com
on 4 Aug 2011 at 7:58
No, coverage only.
Original comment by hiddenpy...@googlemail.com
on 4 Aug 2011 at 10:19
There is two coverage instance initialized here, it's not a bug in nose. You
should try to remove those two line in melange run.py :
from nose.plugins import cover
plugin = cover.Coverage()
Original comment by timothee...@gmail.com
on 4 Aug 2011 at 10:22
Hi Tim, thanks a lot for your suggestion.
There is, however, only one coverage instance initialized here. Where is the
other one :-)? Does nose initialize another instance automatically instead of
reusing the one in plugins?
Original comment by hiddenpy...@googlemail.com
on 4 Aug 2011 at 10:57
Original issue reported on code.google.com by
praveen9...@gmail.com
on 2 Aug 2011 at 7:21