JetBrains / teamcity-messages

Python Unit Test Reporting to TeamCity
https://pypi.python.org/pypi/teamcity-messages
Apache License 2.0
137 stars 81 forks source link

py.test plugin is incompatible with coverage 7.x #273

Open yigor opened 1 year ago

yigor commented 1 year ago
[16:42:05][Step 3/4] Coverage statistics reporting failed
Traceback (most recent call last):
  File "/opt/buildagent/work/13fee7d45aa6a432/.tox/testenv/.venv/lib/python3.8/site-packages/teamcity/pytest_plugin.py", line 335, in pytest_terminal_summary
    self._report_coverage()
  File "/opt/buildagent/work/13fee7d45aa6a432/.tox/testenv/.venv/lib/python3.8/site-packages/teamcity/pytest_plugin.py", line 427, in _report_coverage
    reporter = _CoverageReporter(
  File "/opt/buildagent/work/13fee7d45aa6a432/.tox/testenv/.venv/lib/python3.8/site-packages/teamcity/pytest_plugin.py", line 372, in __init__
    super(_CoverageReporter, self).__init__(coverage, config)
  File "/opt/buildagent/work/13fee7d45aa6a432/.tox/testenv/.venv/lib/python3.8/site-packages/teamcity/pytest_plugin.py", line 362, in __init__
    self._reporter = Reporter(coverage, config)
TypeError: Reporter() takes no arguments

This is because coverage.report module now contains Reporter class which inherits from typing.Protocol.

dmitry-moroz commented 1 year ago

Nice patch version 7.0.1 -> 7.0.2! 😄 https://github.com/nedbat/coveragepy/commit/e3c523c98cbc9ecdd37e36da19848ca9d0aef4a3#diff-d11c5e441d59ed59bc74058b8a78ae110cf2598939c8b5d2e37799a1904accd6