Issue 21100: Amazingly, tuple lexicographic ordering was untested.

This commit is contained in:
Raymond Hettinger 2014-03-30 10:12:09 -07:00
parent ba26001ba6
commit e5bb551cc5

View file

@ -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)