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
commitdef4220545056b74202dba7288c546844e8fb44c (patch)
tree21edf9af90c22f409c706742017d3d39310b37b8 /setuptools/tests/test_test.py
parentf07c3fec268e0bbf66aa8b90dd6bc940ff53c917 (diff)
downloadpython-setuptools-bitbucket-def4220545056b74202dba7288c546844e8fb44c.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
-