From: Raymond Hettinger Date: Sun, 30 Mar 2014 17:12:09 +0000 (-0700) Subject: Issue 21100: Amazingly, tuple lexicographic ordering was untested. X-Git-Tag: v3.5.0a1~1989 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5bb551cc5042a2523f06d0135d055e2274ae0d7;p=thirdparty%2FPython%2Fcpython.git Issue 21100: Amazingly, tuple lexicographic ordering was untested. --- diff --git a/Lib/test/test_tuple.py b/Lib/test/test_tuple.py index e41711c8e69e..14c64308694f 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)