I'm pretty green with python testing, so this might be something that I am doing wrong.
When I run my tests, the test runners work fine and cover too .. but between the two I get an assertion error:
Traceback (most recent call last): File "/usr/local/bin/coverage", line 9, in <module> load_entry_point('coverage==3.5.1', 'console_scripts', 'coverage')() File "/usr/local/lib/python2.7/dist-packages/coverage/cmdline.py", line 657, in main status = CoverageScript().command_line(argv) File "/usr/local/lib/python2.7/dist-packages/coverage/cmdline.py", line 526, in command_line self.coverage.stop() File "/usr/local/lib/python2.7/dist-packages/coverage/control.py", line 389, in stop self.collector.stop() File "/usr/local/lib/python2.7/dist-packages/coverage/collector.py", line 262, in stop assert self._collectors[-1] is self AssertionError
To complicate the task, I am trying to check the command line utility. This means that I had to tell coverage to cover subprocess calls.
I think I got this part since coverage currently reports% coverage for running the script. But since I got coverage, I cannot get rid of AssertionError.
Some help in understanding what would be wrong to appreciate. All my code is available on github:
Quick start:
cd /tmp/ && git clone git://github.com/h3/django-duke-client.git cd django-duke-client && chmod a+x run_tests && ./run_tests
thanks
Update
I ran the test on another computer and got the same AssertionError .. plus a new TypeError. Again, the tests run correctly, and the coverage also works fine even with these errors.
... Ran 9 tests in 1.324s OK Traceback (most recent call last): File "/usr/local/bin/coverage", line 9, in <module> load_entry_point('coverage==3.5.1', 'console_scripts', 'coverage')() File "/usr/local/lib/python2.7/dist-packages/coverage/cmdline.py", line 657, in main status = CoverageScript().command_line(argv) File "/usr/local/lib/python2.7/dist-packages/coverage/cmdline.py", line 526, in command_line self.coverage.stop() File "/usr/local/lib/python2.7/dist-packages/coverage/control.py", line 389, in stop self.collector.stop() File "/usr/local/lib/python2.7/dist-packages/coverage/collector.py", line 262, in stop assert self._collectors[-1] is self AssertionError Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function info('process shutting down') TypeError: 'NoneType' object is not callable Error in sys.exitfunc: Traceback (most recent call last): File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function info('process shutting down') TypeError: 'NoneType' object is not callable Name Stmts Miss Branch BrPart Cover Missing