diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-05-29 05:08:50 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-05-29 05:08:50 +0000 |
commit | abb34fe9f3e9a1d4fe2bedee315e360fbf0b2ce5 (patch) | |
tree | 53be4bd55de2d39e02e4314f8c6aa06231b543f2 /Lib/test/test_userstring.py | |
parent | 5ec330cb2f1b041ebba6dedb6a02cd27a7e9f3da (diff) | |
download | cpython-git-abb34fe9f3e9a1d4fe2bedee315e360fbf0b2ce5.tar.gz |
UserString.MutableString has been removed in Python 3.0.
Works on issue #2877. Thanks Quentin Gallet-Gilles for the patch.
Diffstat (limited to 'Lib/test/test_userstring.py')
-rwxr-xr-x | Lib/test/test_userstring.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_userstring.py b/Lib/test/test_userstring.py index 06636fcb64..cae610ef73 100755 --- a/Lib/test/test_userstring.py +++ b/Lib/test/test_userstring.py @@ -4,8 +4,8 @@ import string from test import test_support, string_tests - from UserString import UserString, MutableString +import warnings class UserStringTest( string_tests.CommonTest, @@ -135,7 +135,10 @@ class MutableStringTest(UserStringTest): self.assertEqual(s, "") def test_main(): - test_support.run_unittest(UserStringTest, MutableStringTest) + with test_support.catch_warning(record=False): + warnings.filterwarnings("ignore", ".*MutableString", + DeprecationWarning) + test_support.run_unittest(UserStringTest, MutableStringTest) if __name__ == "__main__": test_main() |