Skip to content

Commit ae35c27

Browse files
committed
PyPy 3.7 doesn't act exactly like CPython 3.7
1 parent 4e8f18e commit ae35c27

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

coverage/env.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class PYBEHAVIOR(object):
6666
# used to be an empty string (meaning the current directory). It changed
6767
# to be the actual path to the current directory, so that os.chdir wouldn't
6868
# affect the outcome.
69-
actual_syspath0_dash_m = (PYVERSION >= (3, 7, 0, 'beta', 3))
69+
actual_syspath0_dash_m = (not PYPY) and (PYVERSION >= (3, 7, 0, 'beta', 3))
7070

7171
# When a break/continue/return statement in a try block jumps to a finally
7272
# block, does the finally block do the break/continue/return (pre-3.8), or

tests/test_parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def bar(self):
214214
expected_arcs = set(arcz_to_arcs(".1 14 48 8. .2 2. -8A A-8"))
215215
expected_exits = {1: 1, 2: 1, 4: 1, 8: 1, 10: 1}
216216

217-
if env.PYVERSION >= (3, 7, 0, 'beta', 5):
217+
if (not env.PYPY) and (env.PYVERSION >= (3, 7, 0, 'beta', 5)):
218218
# 3.7 changed how functions with only docstrings are numbered.
219219
expected_arcs.update(set(arcz_to_arcs("-46 6-4")))
220220
expected_exits.update({6: 1})

tests/test_process.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ def test_fullcoverage(self): # pragma: no metacov
743743
self.assertGreater(line_counts(data)['os.py'], 50)
744744

745745
@xfail(
746-
env.PYPY3 and env.PYPYVERSION >= (7, 1, 1),
746+
env.PYPY3 and ((7, 1, 1) <= env.PYPYVERSION < (7, 3)),
747747
"https://bitbucket.org/pypy/pypy/issues/3074"
748748
)
749749
def test_lang_c(self):

0 commit comments

Comments
 (0)