summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_test.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-02 12:44:43 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-02 12:44:43 -0500
commit23c128e6ba47135134c317f42f1f42426eb9ae78 (patch)
tree9d172e2c0bb20c3790b3809a00ebfb36e3b3b64b /setuptools/tests/test_test.py
parentea576715047f0b4356d2ee39ec7c603305db0e8a (diff)
downloadpython-setuptools-git-23c128e6ba47135134c317f42f1f42426eb9ae78.tar.gz
Suppress exceptions in a context for clarity, brevity, and reuse.
Diffstat (limited to 'setuptools/tests/test_test.py')
-rw-r--r--setuptools/tests/test_test.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py
index 51c3a9b4..41b7d078 100644
--- a/setuptools/tests/test_test.py
+++ b/setuptools/tests/test_test.py
@@ -91,9 +91,6 @@ class TestTestTest:
cmd.install_dir = site.USER_SITE
cmd.user = 1
with contexts.quiet():
- try:
+ # The test runner calls sys.exit
+ with contexts.suppress_exceptions(SystemExit):
cmd.run()
- except SystemExit:
- # The test runner calls sys.exit; suppress the exception
- pass
-