[Python-checkins] python/dist/src/Lib/test test_userstring.py, 1.13, 1.14

doerwalter at users.sourceforge.net doerwalter at users.sourceforge.net
Thu Feb 17 19:51:50 CET 2005


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26604/Lib/test

Modified Files:
	test_userstring.py 
Log Message:
Add a basic test for UserString.MutableString.


Index: test_userstring.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_userstring.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- test_userstring.py	4 Aug 2004 07:38:33 -0000	1.13
+++ test_userstring.py	17 Feb 2005 18:51:48 -0000	1.14
@@ -5,7 +5,7 @@
 import unittest
 from test import test_support, string_tests
 
-from UserString import UserString
+from UserString import UserString, MutableString
 
 class UserStringTest(
     string_tests.CommonTest,
@@ -43,8 +43,15 @@
         # we don't fix the arguments, because UserString can't cope with it
         getattr(object, methodname)(*args)
 
+class MutableStringTest(UserStringTest):
+    type2test = MutableString
+
+    # MutableStrings can be hashed => deactivate test
+    def test_hash(self):
+        pass
+
 def test_main():
-    test_support.run_unittest(UserStringTest)
+    test_support.run_unittest(UserStringTest, MutableStringTest)
 
 if __name__ == "__main__":
     test_main()



More information about the Python-checkins mailing list