-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
Description
🐛 Bug
My IDE spotted a tiny bug/readability issue on the TestCase.assertExpected() method:
Lines 153 to 159 in fdca307
equal = False | |
try: | |
equal = self.assertEqual(output, expected, prec=prec) | |
except Exception: | |
equal = False | |
if not equal: | |
return accept_output("updated output") |
The method TestCase.assertEqual()
does not return a value, hence if successful the variable equal
will be None
. The code still work but it can be simplified to improve readability:
try:
self.assertEqual(output, expected, prec=prec)
except Exception:
return accept_output("updated output")
fmassa