summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tuple.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_tuple.py')
-rw-r--r--Lib/test/test_tuple.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_tuple.py b/Lib/test/test_tuple.py
index 62c5d71..77672e7 100644
--- a/Lib/test/test_tuple.py
+++ b/Lib/test/test_tuple.py
@@ -7,6 +7,13 @@ class TupleTest(seq_tests.CommonTest):
super().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().test_truth()