From: Mark Dickinson Date: Sun, 27 Dec 2009 21:31:50 +0000 (+0000) Subject: Use a more idiomatic check in check_truediv. X-Git-Tag: v2.7a2~105 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e079636853d1536a6e161c25fc449d7f3c60ac75;p=python Use a more idiomatic check in check_truediv. --- diff --git a/Lib/test/test_long_future.py b/Lib/test/test_long_future.py index f863d527ae..76c3bfbdbc 100644 --- a/Lib/test/test_long_future.py +++ b/Lib/test/test_long_future.py @@ -118,9 +118,8 @@ class TrueDivisionTests(unittest.TestCase): except ZeroDivisionError: got = 'zerodivision' - if expected != got: - self.fail("Incorrectly rounded division {}/{}: expected {!r}, " - "got {!r}.".format(a, b, expected, got)) + self.assertEqual(expected, got, "Incorrectly rounded division {}/{}: " + "expected {}, got {}".format(a, b, expected, got)) @requires_IEEE_754 def test_correctly_rounded_true_division(self):