Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Lib/test/mapping_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def __new__(cls):
class Exc(Exception): pass

class baddict1(self.type2test):
def __init__(self):
def __init__(self, *args, **kwargs):
raise Exc()

self.assertRaises(Exc, baddict1.fromkeys, [1])
Expand Down Expand Up @@ -595,12 +595,14 @@ def test_mutatingiteration(self):
d = self._empty_mapping()
d[1] = 1
try:
count = 0
for i in d:
d[i+1] = 1
if count >= 1:
self.fail("changing dict size during iteration doesn't raise Error")
count += 1
except RuntimeError:
pass
else:
self.fail("changing dict size during iteration doesn't raise Error")

def test_repr(self):
d = self._empty_mapping()
Expand Down