mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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):
|
||||
[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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue