summaryrefslogtreecommitdiff
path: root/coverage/env.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-05-31 19:10:04 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-06-05 19:51:48 -0400
commitd7a37bf8cfabac27698a2159a367b9e640581e86 (patch)
tree78adbe5afed5d587676edcad8c1f4d00279cd999 /coverage/env.py
parentb1c079ed5b5f0ccf8ed81fbc354418709ff6269d (diff)
downloadpython-coveragepy-git-d7a37bf8cfabac27698a2159a367b9e640581e86.tar.gz
fix: in Python 3.10, leaving a with block exits through the with statement.
This need 3.10.0b3 (not yet released) to fully pass.
Diffstat (limited to 'coverage/env.py')
-rw-r--r--coverage/env.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/coverage/env.py b/coverage/env.py
index cc8ca8b7..81f61794 100644
--- a/coverage/env.py
+++ b/coverage/env.py
@@ -99,6 +99,9 @@ class PYBEHAVIOR:
# Are "if 0:" lines (and similar) kept in the compiled code?
keep_constant_test = pep626
+ # When leaving a with-block, do we visit the with-line again for the exit?
+ exit_through_with = (PYVERSION >= (3, 10, 0, 'beta'))
+
# Coverage.py specifics.
# Are we using the C-implemented trace function?