mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue 21100: Amazingly, tuple lexicographic ordering was untested.
This commit is contained in:
parent
ba26001ba6
commit
e5bb551cc5
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue