diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-08-03 07:01:05 +0000 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-08-03 07:01:05 +0000 |
commit | 670048de8040a954f504cfe3a992bf2b5983cf8a (patch) | |
tree | 2f2ba68c125c1362934e742eee2eb1c31acc8d76 | |
parent | aad15414842ae797fa3f0d7a4a2868e9f8f71370 (diff) | |
download | cpython-git-670048de8040a954f504cfe3a992bf2b5983cf8a.tar.gz |
Fix deprecation warnings in test_long_future.py
-rw-r--r-- | Lib/test/test_long_future.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_long_future.py b/Lib/test/test_long_future.py index 9044da6b6d..25bd7a7305 100644 --- a/Lib/test/test_long_future.py +++ b/Lib/test/test_long_future.py @@ -4,7 +4,7 @@ from __future__ import division # trick just part of test_long into using future division. import unittest -from test.test_support import run_unittest +from test.test_support import run_unittest, _check_py3k_warnings class TrueDivisionTests(unittest.TestCase): def test(self): @@ -44,8 +44,9 @@ class TrueDivisionTests(unittest.TestCase): self.assertEqual(result, 0.0, "expected underflow to 0 from %r" % underflow) - for zero in ["huge / 0", "huge / 0L", "mhuge / 0", "mhuge / 0L"]: - self.assertRaises(ZeroDivisionError, eval, zero, namespace) + with _check_py3k_warnings(('classic long division', DeprecationWarning)): + for zero in ["huge / 0", "huge / 0L", "mhuge / 0", "mhuge / 0L"]: + self.assertRaises(ZeroDivisionError, eval, zero, namespace) def test_main(): |