Open jpellerin opened 12 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= ?
Google Code Info: Author: kumar.mcmillan Created On: 2011-08-02T20:02:10.000Z
Tim, do you have any ideas on this?
Google Code Info: Author: kumar.mcmillan Created On: 2011-08-02T20:03:46.000Z
Which version of coverage do you use ?!
Google Code Info: Author: timothee.peignier@gmail.com Created On: 2011-08-02T20:10:52.000Z
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.
Google Code Info: Author: praveen9...@gmail.com Created On: 2011-08-02T20:15:20.000Z
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.
Google Code Info: Author: timothee.peignier@gmail.com Created On: 2011-08-02T20:59:37.000Z
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
Google Code Info: Author: praveen9...@gmail.com Created On: 2011-08-03T16:39:23.000Z
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
Google Code Info: Author: hiddenpy...@gmail.com Created On: 2011-08-03T22:10:40.000Z
Are use using xcoverage here ?
Google Code Info: Author: timothee.peignier@gmail.com Created On: 2011-08-04T07:58:17.000Z
No, coverage only.
Google Code Info: Author: hiddenpy...@gmail.com Created On: 2011-08-04T10:19:22.000Z
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()
Google Code Info: Author: timothee.peignier@gmail.com Created On: 2011-08-04T10:22:28.000Z
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?
Google Code Info: Author: hiddenpy...@gmail.com Created On: 2011-08-04T10:57:53.000Z
Hi! This is Praveen Kumar working with Melange on their testing project. Running the tests with the coverage option results in an AttributeError as shown in the following traceback. The tests run fine with the cover.py in nose 1.0.0. I am not familiar with nose code base otherwise I would have submitted a patch to fix this.
Traceback (most recent call last): File "bin/run-tests", line 42, in
tests.run.main()
File "/home/praveen/melangecopy/tests/run.py", line 174, in main
nose.main(addplugins=plugins)
File "/home/praveen/melangecopy/eggs/nose-1.1.2-py2.5.egg/nose/core.py", line 118, in init
_extra_args)
File "/usr/local/lib/python2.5/unittest.py", line 768, in init
self.runTests()
File "/home/praveen/melangecopy/eggs/nose-1.1.2-py2.5.egg/nose/core.py", line 197, in runTests
result = self.testRunner.run(self.test)
File "/home/praveen/melangecopy/eggs/nose-1.1.2-py2.5.egg/nose/core.py", line 63, in run
result.printErrors()
File "/home/praveen/melangecopy/eggs/nose-1.1.2-py2.5.egg/nose/result.py", line 110, in printErrors
self.config.plugins.report(self.stream)
File "/home/praveen/melangecopy/eggs/nose-1.1.2-py2.5.egg/nose/plugins/manager.py", line 94, in call
return self.call(_arg, _kw)
File "/home/praveen/melangecopy/eggs/nose-1.1.2-py2.5.egg/nose/plugins/manager.py", line 162, in simple
result = meth(_arg, **kw)
File "/home/praveen/melangecopy/eggs/nose-1.1.2-py2.5.egg/nose/plugins/cover.py", line 167, in report
self.coverInstance.save()
AttributeError: 'module' object has no attribute 'save'
Google Code Info: Issue #: 443 Author: praveen9...@gmail.com Created On: 2011-08-02T19:21:47.000Z Closed On: