diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-01-10 05:43:26 (GMT) |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-01-10 05:43:26 (GMT) |
| commit | 0dceb560b6b7bfc0a2e11d3a6c27f0a7c7e2e619 (patch) | |
| tree | 6b3ba08afc6eed3ffd91535a707637e39577b315 /Lib/test/test_userstring.py | |
| parent | 2688e810643cd0965926912862c6ab225fc2c974 (diff) | |
| download | cpython-0dceb560b6b7bfc0a2e11d3a6c27f0a7c7e2e619.zip cpython-0dceb560b6b7bfc0a2e11d3a6c27f0a7c7e2e619.tar.gz cpython-0dceb560b6b7bfc0a2e11d3a6c27f0a7c7e2e619.tar.bz2 | |
#16910: test_bytes, test_unicode, and test_userstring now work with unittest test discovery. Patch by Zachary Ware.
Diffstat (limited to 'Lib/test/test_userstring.py')
| -rwxr-xr-x | Lib/test/test_userstring.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_userstring.py b/Lib/test/test_userstring.py index d5d0c89..71fcac2 100755 --- a/Lib/test/test_userstring.py +++ b/Lib/test/test_userstring.py @@ -3,6 +3,7 @@ # UserString instances should behave similar to builtin string objects. import string +import unittest from test import support, string_tests from collections import UserString @@ -10,6 +11,7 @@ from collections import UserString class UserStringTest( string_tests.CommonTest, string_tests.MixinStrUnicodeUserStringTest, + unittest.TestCase ): type2test = UserString @@ -42,8 +44,5 @@ class UserStringTest( getattr(object, methodname)(*args) -def test_main(): - support.run_unittest(UserStringTest) - if __name__ == "__main__": - test_main() + unittest.main() |
