diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-04-16 01:27:44 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-04-16 01:27:44 (GMT) |
commit | d392506c43a48d570a09a15e7f1889873fe17d6c (patch) | |
tree | 83ceeade55a3a7b201f7bcafe3a0804b85ad3c3c /Lib/test/test_repr.py | |
parent | 50ac30ee0190ea2dd4ede87d63d6ebba23bd3a11 (diff) | |
download | cpython-d392506c43a48d570a09a15e7f1889873fe17d6c.zip cpython-d392506c43a48d570a09a15e7f1889873fe17d6c.tar.gz cpython-d392506c43a48d570a09a15e7f1889873fe17d6c.tar.bz2 |
Tighten up some warning filters, and break some dependencies on the
order in which the tests are normally run.
Diffstat (limited to 'Lib/test/test_repr.py')
-rw-r--r-- | Lib/test/test_repr.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_repr.py b/Lib/test/test_repr.py index 89df890..1d7ea85 100644 --- a/Lib/test/test_repr.py +++ b/Lib/test/test_repr.py @@ -105,14 +105,18 @@ class ReprTests(unittest.TestCase): '<built-in method split of str object at 0x')) def test_xrange(self): + import warnings eq = self.assertEquals eq(repr(xrange(1)), 'xrange(1)') eq(repr(xrange(1, 2)), 'xrange(1, 2)') eq(repr(xrange(1, 2, 3)), 'xrange(1, 4, 3)') # Turn off warnings for deprecated multiplication - import warnings - warnings.filterwarnings('ignore', category=DeprecationWarning, - module=ReprTests.__module__) + warnings.filterwarnings('ignore', + r'xrange object multiplication is deprecated', + DeprecationWarning, module=ReprTests.__module__) + warnings.filterwarnings('ignore', + r"PyRange_New's 'repetitions' argument is deprecated", + DeprecationWarning, module=ReprTests.__module__) eq(repr(xrange(1) * 3), '(xrange(1) * 3)') def test_nesting(self): |