Coverage fails on composing reports with async/aware syntax

Issue #464 duplicate
Former user created an issue

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 <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

Comments (4)

  1. Andrew Svetlov

    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
    
  2. Log in to comment