From b8fbce640d63962c00ddda3a1d17b14a58fd30c1 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 12 Apr 2021 05:02:37 -0400 Subject: fix: pypy3 7.3.4 uses a non-empty sys.path[0] --- coverage/env.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) -- cgit v1.2.1