diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-04-12 05:02:37 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-04-12 05:02:37 -0400 |
commit | b8fbce640d63962c00ddda3a1d17b14a58fd30c1 (patch) | |
tree | 1fa0df2689794cdc1c21c6eae5c63a2b22b70c90 /coverage/env.py | |
parent | a1f5ef154539bdb580359bd8e349a73ee5243056 (diff) | |
download | python-coveragepy-git-b8fbce640d63962c00ddda3a1d17b14a58fd30c1.tar.gz |
fix: pypy3 7.3.4 uses a non-empty sys.path[0]
Diffstat (limited to 'coverage/env.py')
-rw-r--r-- | coverage/env.py | 5 |
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)) |