From e5bb551cc5042a2523f06d0135d055e2274ae0d7 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sun, 30 Mar 2014 10:12:09 -0700 Subject: Issue 21100: Amazingly, tuple lexicographic ordering was untested. --- Lib/test/test_tuple.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Lib/test/test_tuple.py') diff --git a/Lib/test/test_tuple.py b/Lib/test/test_tuple.py index e41711c8e6..14c6430869 100644 --- a/Lib/test/test_tuple.py +++ b/Lib/test/test_tuple.py @@ -201,6 +201,14 @@ class TupleTest(seq_tests.CommonTest): with self.assertRaises(TypeError): [3,] + T((1,2)) + def test_lexicographic_ordering(self): + # Issue 21100 + a = self.type2test([1, 2]) + b = self.type2test([1, 2, 0]) + c = self.type2test([1, 3]) + self.assertLess(a, b) + self.assertLess(b, c) + def test_main(): support.run_unittest(TupleTest) -- cgit v1.2.1