diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-01-02 07:03:14 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-01-02 07:03:14 -0500 |
commit | a11bcb70c2faa6e24738c668030a97d8ce9b3ffc (patch) | |
tree | 5ed1f455c44a1f218fb0e2042c86860e8ee6d9b1 /coverage/env.py | |
parent | f7f16e7bdd6a67447270624f9796ba01c5e6d431 (diff) | |
download | python-coveragepy-git-a11bcb70c2faa6e24738c668030a97d8ce9b3ffc.tar.gz |
build(test): PyContracts doesn't work on 3.11
and I don't think it ever will.
Diffstat (limited to 'coverage/env.py')
-rw-r--r-- | coverage/env.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/coverage/env.py b/coverage/env.py index a00cfa07..64d93e21 100644 --- a/coverage/env.py +++ b/coverage/env.py @@ -117,4 +117,8 @@ TESTING = os.getenv('COVERAGE_TESTING', '') == 'True' # Environment COVERAGE_NO_CONTRACTS=1 can turn off contracts while debugging # tests to remove noise from stack traces. # $set_env.py: COVERAGE_NO_CONTRACTS - Disable PyContracts to simplify stack traces. -USE_CONTRACTS = TESTING and not bool(int(os.environ.get("COVERAGE_NO_CONTRACTS", 0))) +USE_CONTRACTS = ( + TESTING + and not bool(int(os.environ.get("COVERAGE_NO_CONTRACTS", 0))) + and (PYVERSION < (3, 11)) +) |