diff --git a/.azure-pipelines/templates/jobs/standard-tests-jobs.yml b/.azure-pipelines/templates/jobs/standard-tests-jobs.yml index c49e22bc1..1e6d7a352 100644 --- a/.azure-pipelines/templates/jobs/standard-tests-jobs.yml +++ b/.azure-pipelines/templates/jobs/standard-tests-jobs.yml @@ -7,10 +7,10 @@ jobs: macos-py37-cover: IMAGE_NAME: macOS-12 PYTHON_VERSION: 3.7 - TOXENV: py37-cover + TOXENV: cover macos-cover: IMAGE_NAME: macOS-12 - TOXENV: py3-cover + TOXENV: cover windows-py37: IMAGE_NAME: windows-2019 PYTHON_VERSION: 3.7 @@ -18,7 +18,7 @@ jobs: windows-py39-cover: IMAGE_NAME: windows-2019 PYTHON_VERSION: 3.9 - TOXENV: py39-cover-win + TOXENV: cover-win windows-integration-certbot: IMAGE_NAME: windows-2019 PYTHON_VERSION: 3.9 @@ -37,7 +37,7 @@ jobs: TOXENV: py37 linux-cover: IMAGE_NAME: ubuntu-22.04 - TOXENV: py3-cover + TOXENV: cover linux-lint: IMAGE_NAME: ubuntu-22.04 TOXENV: lint-posix diff --git a/acme/tests/messages_test.py b/acme/tests/messages_test.py index 7d70822a8..405e801a2 100644 --- a/acme/tests/messages_test.py +++ b/acme/tests/messages_test.py @@ -94,18 +94,15 @@ class ErrorTest(unittest.TestCase): # this test is based on a minimal reproduction of a contextmanager/immutable # exception related error: https://github.com/python/cpython/issues/99856 - def test_with_context_manager(self): - from acme.messages import Error - - @contextlib.contextmanager - def context(): - yield + def test_setting_traceback(self): + self.assertIsNone(self.error_custom.__traceback__) try: - with context(): - raise self.error_custom - except Error as e: - self.assertIsNotNone(self.error_custom.__traceback__) + 1/0 + except ZeroDivisionError as e: + self.error_custom.__traceback__ = e.__traceback__ + + self.assertIsNotNone(self.error_custom.__traceback__) class ConstantTest(unittest.TestCase): diff --git a/certbot/docs/contributing.rst b/certbot/docs/contributing.rst index 6d1faf061..49cc1fc81 100644 --- a/certbot/docs/contributing.rst +++ b/certbot/docs/contributing.rst @@ -130,7 +130,7 @@ For debugging, we recommend putting Once you are done with your code changes, and the tests in ``foo_test.py`` pass, run all of the unit tests for Certbot and check for coverage with ``tox --e py3-cover``. You should then check for code style with ``tox -e lint`` (all +-e cover``. You should then check for code style with ``tox -e lint`` (all files) or ``pylint --rcfile=.pylintrc path/to/file.py`` (single file at a time). diff --git a/tox.ini b/tox.ini index a3436e95a..2bdd5e25c 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ [tox] skipsdist = true -envlist = {py3-cover,lint,mypy}-{win,posix} +envlist = {cover,lint,mypy}-{win,posix} [base] # pip installs the requested packages in editable mode