summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_userstring.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-01-10 05:43:26 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-01-10 05:43:26 (GMT)
commit0dceb560b6b7bfc0a2e11d3a6c27f0a7c7e2e619 (patch)
tree6b3ba08afc6eed3ffd91535a707637e39577b315 /Lib/test/test_userstring.py
parent2688e810643cd0965926912862c6ab225fc2c974 (diff)
downloadcpython-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-xLib/test/test_userstring.py7
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()