Kaydet (Commit) e5bb551c authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Issue 21100: Amazingly, tuple lexicographic ordering was untested.

üst ba26001b
...@@ -201,6 +201,14 @@ class TupleTest(seq_tests.CommonTest): ...@@ -201,6 +201,14 @@ class TupleTest(seq_tests.CommonTest):
with self.assertRaises(TypeError): with self.assertRaises(TypeError):
[3,] + T((1,2)) [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(): def test_main():
support.run_unittest(TupleTest) support.run_unittest(TupleTest)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment