summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-04-12 05:02:37 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-04-12 05:02:37 -0400
commitb8fbce640d63962c00ddda3a1d17b14a58fd30c1 (patch)
tree1fa0df2689794cdc1c21c6eae5c63a2b22b70c90
parenta1f5ef154539bdb580359bd8e349a73ee5243056 (diff)
downloadpython-coveragepy-git-b8fbce640d63962c00ddda3a1d17b14a58fd30c1.tar.gz
fix: pypy3 7.3.4 uses a non-empty sys.path[0]
-rw-r--r--coverage/env.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/env.py b/coverage/env.py
index 632f8bf2..adce7989 100644
--- a/coverage/env.py
+++ b/coverage/env.py
@@ -82,7 +82,10 @@ class PYBEHAVIOR(object):
# used to be an empty string (meaning the current directory). It changed
# to be the actual path to the current directory, so that os.chdir wouldn't
# affect the outcome.
- actual_syspath0_dash_m = CPYTHON and (PYVERSION >= (3, 7, 0, 'beta', 3))
+ actual_syspath0_dash_m = (
+ (CPYTHON and (PYVERSION >= (3, 7, 0, 'beta', 3))) or
+ (PYPY3 and (PYPYVERSION >= (7, 3, 4)))
+ )
# 3.7 changed how functions with only docstrings are numbered.
docstring_only_function = (not PYPY) and ((3, 7, 0, 'beta', 5) <= PYVERSION <= (3, 10))