mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
gh-71339: Use new assertion methods in tests (GH-129046)
This commit is contained in:
parent
bb244fd33d
commit
2602d8ae98
117 changed files with 407 additions and 445 deletions
|
@ -70,8 +70,8 @@ class BasicTestMappingProtocol(unittest.TestCase):
|
|||
if not d: self.fail("Full mapping must compare to True")
|
||||
# keys(), items(), iterkeys() ...
|
||||
def check_iterandlist(iter, lst, ref):
|
||||
self.assertTrue(hasattr(iter, '__next__'))
|
||||
self.assertTrue(hasattr(iter, '__iter__'))
|
||||
self.assertHasAttr(iter, '__next__')
|
||||
self.assertHasAttr(iter, '__iter__')
|
||||
x = list(iter)
|
||||
self.assertTrue(set(x)==set(lst)==set(ref))
|
||||
check_iterandlist(iter(d.keys()), list(d.keys()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue