From e079636853d1536a6e161c25fc449d7f3c60ac75 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sun, 27 Dec 2009 21:31:50 +0000 Subject: [PATCH] Use a more idiomatic check in check_truediv. --- Lib/test/test_long_future.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_long_future.py b/Lib/test/test_long_future.py index f863d527ae7..76c3bfbdbc5 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):