aboutsummaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-11-23 23:47:57 -0800
committerCopybara-Service <copybara-worker@google.com>2020-11-23 23:48:19 -0800
commit0a4993a1d6e86d9c35edf4f345737a5787eb3892 (patch)
treea45a8fe8d52ffcb135055df5774f1acdf5ab879b /absl
parent70c25d5aec64f1a40413cb1cddb26566d571efd0 (diff)
downloadabsl-py-0a4993a1d6e86d9c35edf4f345737a5787eb3892.tar.gz
Catch unittest.case.SkipTest when running tests for debugging.
This prevents dropping into the debugger on skipped tests. PiperOrigin-RevId: 343998913 Change-Id: I2bf16cafabf420d4b3060ad7bc349af1e4d8cca3
Diffstat (limited to 'absl')
-rw-r--r--absl/testing/_pretty_print_reporter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/absl/testing/_pretty_print_reporter.py b/absl/testing/_pretty_print_reporter.py
index 913e509..2f22a19 100644
--- a/absl/testing/_pretty_print_reporter.py
+++ b/absl/testing/_pretty_print_reporter.py
@@ -88,7 +88,10 @@ class TextTestRunner(unittest.TextTestRunner):
def _run_debug(self, test):
# type: (TestCase) -> TestResult
- test.debug()
+ try:
+ test.debug()
+ except unittest.SkipTest:
+ pass
# Return an empty result to indicate success.
return self._makeResult()