summaryrefslogtreecommitdiff
path: root/coverage/env.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-12-27 06:57:18 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-12-27 07:20:49 -0500
commit5af6270dd72f2a217823a32bf7141d3f7c1a2a92 (patch)
treeedf3c7dc2a3f71ca31a8269b387e7f08ebdf49b9 /coverage/env.py
parent769ea88198e15d4c549ed57b41abc6b996be68c1 (diff)
downloadpython-coveragepy-git-5af6270dd72f2a217823a32bf7141d3f7c1a2a92.tar.gz
fix: adjust some PyPy behaviors. #1515
Diffstat (limited to 'coverage/env.py')
-rw-r--r--coverage/env.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/coverage/env.py b/coverage/env.py
index f77f22ee..96143dc7 100644
--- a/coverage/env.py
+++ b/coverage/env.py
@@ -67,11 +67,16 @@ class PYBEHAVIOR:
# does the finally jump back to the break/continue/return (3.8) to do the
# work?
finally_jumps_back = ((3, 8) <= PYVERSION < (3, 10))
+ if PYPY and PYPYVERSION < (7, 3, 7):
+ finally_jumps_back = False
# When a function is decorated, does the trace function get called for the
# @-line and also the def-line (new behavior in 3.8)? Or just the @-line
# (old behavior)?
- trace_decorated_def = (CPYTHON and PYVERSION >= (3, 8)) or (PYPY and PYVERSION >= (3, 9))
+ trace_decorated_def = (
+ (PYVERSION >= (3, 8)) and
+ (CPYTHON or (PYVERSION > (3, 8)) or (PYPYVERSION > (7, 3, 9)))
+ )
# Functions are no longer claimed to start at their earliest decorator even though
# the decorators are traced?