From 23c128e6ba47135134c317f42f1f42426eb9ae78 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:44:43 -0500 Subject: Suppress exceptions in a context for clarity, brevity, and reuse. --- setuptools/tests/test_test.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'setuptools/tests/test_test.py') 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 - -- cgit v1.2.3