diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-12-29 17:06:50 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-12-29 17:29:50 -0500 |
commit | c802be289c40f896e910a4f34f1ce27aedc44a0b (patch) | |
tree | 2892de99d7f5ae157f659318df709757baf86e80 | |
parent | bc83e9c53b810251ee11104eda1ee70772aeff72 (diff) | |
download | python-coveragepy-git-c802be289c40f896e910a4f34f1ce27aedc44a0b.tar.gz |
refactor: @contract is completely gone
-rw-r--r-- | coverage/env.py | 2 | ||||
-rw-r--r-- | coverage/misc.py | 10 | ||||
-rw-r--r-- | tests/test_venv.py | 2 |
3 files changed, 2 insertions, 12 deletions
diff --git a/coverage/env.py b/coverage/env.py index 19eb5530..3d0114c8 100644 --- a/coverage/env.py +++ b/coverage/env.py @@ -132,7 +132,7 @@ METACOV = os.getenv('COVERAGE_COVERAGE', '') != '' # Are we running our test suite? # Even when running tests, you can use COVERAGE_TESTING=0 to disable the -# test-specific behavior like contracts. +# test-specific behavior like AST checking. TESTING = os.getenv('COVERAGE_TESTING', '') == 'True' diff --git a/coverage/misc.py b/coverage/misc.py index 2505e871..0da7f398 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -91,16 +91,6 @@ def import_third_party(modname): return None -# We don't use PyContracts anymore, but the @contracts decorators will be -# useful info when it comes time to add type annotations, so keep them as -# dummies for now. -def contract(*args_unused, **kwargs_unused): - """Dummy no-op implementation of a decorator with arguments.""" - def _decorator(func): - return func - return _decorator - - def nice_pair(pair): """Make a nice string representation of a pair of numbers. diff --git a/tests/test_venv.py b/tests/test_venv.py index e072dbd3..c7436c4e 100644 --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -178,7 +178,7 @@ class VirtualenvTest(CoverageTest): print(sum(colorsys.rgb_to_hls(1, 0, 0))) """) - self.del_environ("COVERAGE_TESTING") # To avoid needing contracts installed. + self.del_environ("COVERAGE_TESTING") # To get realistic behavior self.set_environ("COVERAGE_DEBUG_FILE", "debug_out.txt") self.set_environ("COVERAGE_DEBUG", "trace") |