mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Add test for r87454.
This commit is contained in:
parent
b2eacd9129
commit
83961245b4
1 changed files with 3 additions and 0 deletions
|
|
@ -691,6 +691,9 @@ class Test_TestCase(unittest.TestCase, TestEquality, TestHashing):
|
||||||
|
|
||||||
# Test that sequences of unhashable objects can be tested for sameness:
|
# Test that sequences of unhashable objects can be tested for sameness:
|
||||||
self.assertCountEqual([[1, 2], [3, 4], 0], [False, [3, 4], [1, 2]])
|
self.assertCountEqual([[1, 2], [3, 4], 0], [False, [3, 4], [1, 2]])
|
||||||
|
# Test that iterator of unhashable objects can be tested for sameness:
|
||||||
|
self.assertCountEqual(iter([1, 2, [], 3, 4]),
|
||||||
|
iter([1, 2, [], 3, 4]))
|
||||||
|
|
||||||
# hashable types, but not orderable
|
# hashable types, but not orderable
|
||||||
self.assertRaises(self.failureException, self.assertCountEqual,
|
self.assertRaises(self.failureException, self.assertCountEqual,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue