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

Coverage fails on composing reports with async/aware syntax #464

Closed
nedbat opened this issue Jan 10, 2016 · 4 comments
Closed

Coverage fails on composing reports with async/aware syntax #464

nedbat opened this issue Jan 10, 2016 · 4 comments
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Jan 10, 2016

Originally reported by Anonymous


When I run coverage report for single test suite pass coverage works as expected.

But when I'm trying to use tox for collecting reports from several tox configurations coverage combine fails.

To reproduce the issue please go through the following steps:

  1. clone https://github.com/KeepSafe/aiohttp git repo

  2. make virtualenv against python3.5 interpreter (-p /usr/bin/python3.5 virtualenv/virtualenvwrapper option)

  3. install requirements: pip install -r requirements-dev.txt

  4. run tox tool by tox or make cov -- you'll see the error on the last tox stage

  5. just coverage run without combining work pretty good: make cov-dev produces report as expected


Traceback from make cov is attached:

Traceback (most recent call last):
File ".tox/report/bin/coverage", line 9, in
load_entry_point('coverage==4.0.3', 'console_scripts', 'coverage')()
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/cmdline.py", line 741, in main
status = CoverageScript().command_line(argv)
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/cmdline.py", line 511, in command_line
**report_args)
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/control.py", line 1014, in html_report
return reporter.report(morfs)
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/html.py", line 135, in report
self.report_files(self.html_file, morfs, self.config.html_dir)
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/report.py", line 75, in report_files
report_fn(fr, self.coverage._analyze(fr))
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/control.py", line 891, in _analyze
return Analysis(self.data, it)
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/results.py", line 28, in init
self._arc_possibilities = sorted(self.file_reporter.arcs())
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/python.py", line 165, in arcs
return self.parser.arcs()
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/parser.py", line 238, in arcs
for l1, l2 in self.byte_parser._all_arcs():
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/parser.py", line 624, in _all_arcs
arcs.update(bp._arcs())
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/parser.py", line 561, in _arcs
chunks = self._split_into_chunks()
File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/parser.py", line 493, in _split_into_chunks
block_stack.pop()
IndexError: pop from empty list


@nedbat
Copy link
Owner Author

nedbat commented Jan 10, 2016

Original comment by Andrew Svetlov (Bitbucket: asvetlov, GitHub: asvetlov)


Sorry, I've reported without bitbucket login and made a mess in traceback.

Well formatted traceback is:

Traceback (most recent call last):
  File ".tox/report/bin/coverage", line 9, in <module>
    load_entry_point('coverage==4.0.3', 'console_scripts', 'coverage')()
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/cmdline.py", line 741, in main
    status = CoverageScript().command_line(argv)
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/cmdline.py", line 511, in command_line
    **report_args)
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/control.py", line 1014, in html_report
    return reporter.report(morfs)
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/html.py", line 135, in report
    self.report_files(self.html_file, morfs, self.config.html_dir)
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/report.py", line 75, in report_files
    report_fn(fr, self.coverage._analyze(fr))
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/control.py", line 891, in _analyze
    return Analysis(self.data, it)
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/results.py", line 28, in __init__
    self._arc_possibilities = sorted(self.file_reporter.arcs())
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/python.py", line 165, in arcs
    return self.parser.arcs()
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/parser.py", line 238, in arcs
    for l1, l2 in self.byte_parser._all_arcs():
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/parser.py", line 624, in _all_arcs
    arcs.update(bp._arcs())
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/parser.py", line 561, in _arcs
    chunks = self._split_into_chunks()
  File "/home/andrew/projects/aiohttp/.tox/report/lib/python3.5/site-packages/coverage/parser.py", line 493, in _split_into_chunks
    block_stack.pop()
IndexError: pop from empty list

@nedbat
Copy link
Owner Author

nedbat commented Jan 10, 2016

Duplicate of #434.

@nedbat
Copy link
Owner Author

nedbat commented Jan 10, 2016

BTW, this is fixed in 4.1 beta, coming out today :)

@nedbat
Copy link
Owner Author

nedbat commented Jan 10, 2016

Original comment by Andrew Svetlov (Bitbucket: asvetlov, GitHub: asvetlov)


Thanks a lot!

@nedbat nedbat closed this as completed Jan 10, 2016
@nedbat nedbat added major bug Something isn't working labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant