From 708a5ea9648cab35597879c176a7366fd630c4db Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 8 Feb 2014 14:28:20 +0200 Subject: [PATCH] Issue #20546: Use specific asserts in int tests. --- Lib/test/test_long.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py index f0847e7ab4..8d16bb0387 100644 --- a/Lib/test/test_long.py +++ b/Lib/test/test_long.py @@ -90,7 +90,7 @@ class LongTest(test_int.IntLongCommonTests, unittest.TestCase): # The sign of the number is also random. def getran(self, ndigits): - self.assertTrue(ndigits > 0) + self.assertGreater(ndigits, 0) nbits_hi = ndigits * SHIFT nbits_lo = nbits_hi - SHIFT + 1 answer = 0L @@ -588,7 +588,7 @@ class LongTest(test_int.IntLongCommonTests, unittest.TestCase): pass x = long2(1L<<100) y = int(x) - self.assertTrue(type(y) is long, + self.assertIs(type(y), long, "overflowing int conversion must return long not long subtype") # long -> Py_ssize_t conversion -- 2.50.1