diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-05-03 21:35:18 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-05-03 21:35:18 (GMT) |
commit | 979395b7a8be422dfc9a081f1cd77260c6ea9aef (patch) | |
tree | 3e2ad9f9e20e1846bd98bc75822f997cb6492400 /Lib/test/test_tuple.py | |
parent | 761b9c6a53f3f5d13121c271e82a17f2447bd801 (diff) | |
download | cpython-979395b7a8be422dfc9a081f1cd77260c6ea9aef.zip cpython-979395b7a8be422dfc9a081f1cd77260c6ea9aef.tar.gz cpython-979395b7a8be422dfc9a081f1cd77260c6ea9aef.tar.bz2 |
Moved testing of builtin types out of test_builtin and into type specific modules
Diffstat (limited to 'Lib/test/test_tuple.py')
-rw-r--r-- | Lib/test/test_tuple.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_tuple.py b/Lib/test/test_tuple.py index c413709..15bc295 100644 --- a/Lib/test/test_tuple.py +++ b/Lib/test/test_tuple.py @@ -7,6 +7,13 @@ class TupleTest(seq_tests.CommonTest): super(TupleTest, self).test_len() # calling built-in types without argument must return empty self.assertEqual(tuple(), ()) + t0_3 = (0, 1, 2, 3) + t0_3_bis = tuple(t0_3) + self.assert_(t0_3 is t0_3_bis) + self.assertEqual(tuple([]), ()) + self.assertEqual(tuple([0, 1, 2, 3]), (0, 1, 2, 3)) + self.assertEqual(tuple(''), ()) + self.assertEqual(tuple('spam'), ('s', 'p', 'a', 'm')) def test_truth(self): super(TupleTest, self).test_truth() |