Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling newbrough/coverage tests with nose causes traceback #1

Open
retrogradeorbit opened this issue Jan 28, 2013 · 2 comments
Open

Comments

@retrogradeorbit
Copy link

Tests run fine but then on exit get the following traceback::

Traceback (most recent call last):
  File "vptest/bin/nosetests", line 9, in 
    load_entry_point('nose==1.2.1', 'console_scripts', 'nosetests')()
  File "/home/crispin/dev/panopticon/vptest/local/lib/python2.7/site-packages/nose/core.py", line 118, in __init__
    **extra_args)
  File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
    self.runTests()
  File "/home/crispin/dev/panopticon/vptest/local/lib/python2.7/site-packages/nose/core.py", line 197, in runTests
    result = self.testRunner.run(self.test)
  File "/home/crispin/dev/panopticon/vptest/local/lib/python2.7/site-packages/nose/core.py", line 63, in run
    result.printErrors()
  File "/home/crispin/dev/panopticon/vptest/local/lib/python2.7/site-packages/nose/result.py", line 110, in printErrors
    self.config.plugins.report(self.stream)
  File "/home/crispin/dev/panopticon/vptest/local/lib/python2.7/site-packages/nose/plugins/manager.py", line 99, in __call__
    return self.call(*arg, **kw)
  File "/home/crispin/dev/panopticon/vptest/local/lib/python2.7/site-packages/nose/plugins/manager.py", line 167, in simple
    result = meth(*arg, **kw)
  File "/home/crispin/dev/panopticon/vptest/local/lib/python2.7/site-packages/nose/plugins/cover.py", line 158, in report
    self.coverInstance.stop()
  File "/home/crispin/dev/panopticon/vptest/src/coverage/coverage/control.py", line 387, in stop
    self.collector.stop()
  File "/home/crispin/dev/panopticon/vptest/src/coverage/coverage/control.py", line 484, in _harvest_data
    self.data.add_line_data(self.collector.get_line_data())
  File "/home/crispin/dev/panopticon/vptest/src/coverage/coverage/collector.py", line 265, in get_line_data
    for l1, _ in list(arcs.keys()):
TypeError: 'int' object is not iterable

Whats the recommended testrunner for this version of coverage?

@retrogradeorbit
Copy link
Author

Turns out to be caused by trying to follow branches. Was issuing call with:

nosetests --with-coverage --cover-erase --cover-package=panopticon --cover-branches --cover-html ./tests/*.py

removing the --cover-branches stops the exception from being raised.

Suggest added support for branches, or at least detecting nose cover-branch calls and throwing a more specific 'branches not supported' exception?

@brifordwylie
Copy link

Just a +1 on this, ran into the same issue tonight :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants