summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2022-05-10 09:50:10 +0200
committerBenjamin Berg <bberg@redhat.com>2022-05-10 09:50:10 +0200
commit27b618a93ede3df5224d5d7f90155d901029953b (patch)
treed213491e46419690f384348cdf44019611458a55
parentff0aa64e2d9e72d8b54b28cd3615ee3cfe342fdc (diff)
tests: Hide intermediate error in output checker
The output checker raises from an exception handler. Add the appropriate "from None" to hide that intermediate exception.
-rw-r--r--tests/output_checker.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/output_checker.py b/tests/output_checker.py
index 265e323..d1a8c4c 100644
--- a/tests/output_checker.py
+++ b/tests/output_checker.py
@@ -98,16 +98,16 @@ class OutputChecker(object):
# EOF, throw error
if self._pipe_fd_r == -1:
if failmsg:
- raise AssertionError("No further messages: " % failmsg)
+ raise AssertionError("No further messages: " % failmsg) from None
else:
- raise AssertionError('No client waiting for needle %s' % (str(needle_re)))
+ raise AssertionError('No client waiting for needle %s' % (str(needle_re))) from None
# Check if should wake up
if not self._lines_sem.acquire(timeout = deadline - time.time()):
if failmsg:
- raise AssertionError(failmsg)
+ raise AssertionError(failmsg) from None
else:
- raise AssertionError('Timed out waiting for needle %s (timeout: %0.2f)' % (str(needle_re), timeout))
+ raise AssertionError('Timed out waiting for needle %s (timeout: %0.2f)' % (str(needle_re), timeout)) from None
continue
ret.append(l)