Moved testing of builtin types out of test_builtin and into type specific modules
diff --git a/Lib/test/test_str.py b/Lib/test/test_str.py
index 37db252..535e66a 100644
--- a/Lib/test/test_str.py
+++ b/Lib/test/test_str.py
@@ -17,6 +17,20 @@
def fixtype(self, obj):
return obj
+ def test_basic_creation(self):
+ self.assertEqual(str(''), '')
+ self.assertEqual(str(0), '0')
+ self.assertEqual(str(0L), '0')
+ self.assertEqual(str(()), '()')
+ self.assertEqual(str([]), '[]')
+ self.assertEqual(str({}), '{}')
+ a = []
+ a.append(a)
+ self.assertEqual(str(a), '[[...]]')
+ a = {}
+ a[0] = a
+ self.assertEqual(str(a), '{0: {...}}')
+
def test_formatting(self):
string_tests.MixinStrUnicodeUserStringTest.test_formatting(self)
self.assertRaises(OverflowError, '%c'.__mod__, 0x1234)