diff options
| author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-21 01:14:24 (GMT) |
|---|---|---|
| committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-21 01:14:24 (GMT) |
| commit | 07627880813ffaad8d9b90bfe8791ccf588b031b (patch) | |
| tree | 14fbe48b451085257da7c79781999cc86729c74f /Lib/test/test_long.py | |
| parent | 8cb253f8d6333af0a575d5951379c090752c0fc6 (diff) | |
| download | cpython-07627880813ffaad8d9b90bfe8791ccf588b031b.zip cpython-07627880813ffaad8d9b90bfe8791ccf588b031b.tar.gz cpython-07627880813ffaad8d9b90bfe8791ccf588b031b.tar.bz2 | |
#7092 - Silence more py3k deprecation warnings, using test_support.check_py3k_warnings() helper.
Diffstat (limited to 'Lib/test/test_long.py')
| -rw-r--r-- | Lib/test/test_long.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py index e7bedeb..59967ea 100644 --- a/Lib/test/test_long.py +++ b/Lib/test/test_long.py @@ -574,11 +574,12 @@ class LongTest(unittest.TestCase): def __getslice__(self, i, j): return i, j - self.assertEqual(X()[-5L:7L], (-5, 7)) - # use the clamping effect to test the smallest and largest longs - # that fit a Py_ssize_t - slicemin, slicemax = X()[-2L**100:2L**100] - self.assertEqual(X()[slicemin:slicemax], (slicemin, slicemax)) + with test_support.check_py3k_warnings(): + self.assertEqual(X()[-5L:7L], (-5, 7)) + # use the clamping effect to test the smallest and largest longs + # that fit a Py_ssize_t + slicemin, slicemax = X()[-2L**100:2L**100] + self.assertEqual(X()[slicemin:slicemax], (slicemin, slicemax)) # ----------------------------------- tests of auto int->long conversion @@ -616,8 +617,9 @@ class LongTest(unittest.TestCase): checkit(x, '*', y) if y: - expected = longx / longy - got = x / y + with test_support.check_py3k_warnings(): + expected = longx / longy + got = x / y checkit(x, '/', y) expected = longx // longy |
