Skip to content

Commit

Permalink
fix: can't use PYPYVERSION without checking PYPY first
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Oct 20, 2022
1 parent a3c8683 commit 4668a92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ Unreleased
- A ``[paths]`` setting like ``*/foo`` will now match ``foo/bar.py`` so that
relative file paths can be combined more easily.

- Fix internal logic that prevented coverage.py from running on implementations
other than CPython or PyPy (`issue 1474`_).

.. _issue 991: https://github.com/nedbat/coveragepy/issues/991
.. _issue 1474: https://github.com/nedbat/coveragepy/issues/1474


.. _changes_6-5-0:
Expand Down
5 changes: 4 additions & 1 deletion coverage/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ class PYBEHAVIOR:
nix_while_true = (PYVERSION >= (3, 8))

# CPython 3.9a1 made sys.argv[0] and other reported files absolute paths.
report_absolute_files = ((CPYTHON or (PYPYVERSION >= (7, 3, 10))) and PYVERSION >= (3, 9))
report_absolute_files = (
(CPYTHON or (PYPY and PYPYVERSION >= (7, 3, 10)))
and PYVERSION >= (3, 9)
)

# Lines after break/continue/return/raise are no longer compiled into the
# bytecode. They used to be marked as missing, now they aren't executable.
Expand Down

0 comments on commit 4668a92

Please sign in to comment.