Skip to content

Commit 076e6c3

Browse files
committed
3.12 Account for slice objet being hashable python/cpython#84783
1 parent b53ee4f commit 076e6c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎synapse/tests/test_common.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ def test_common_chunks(self):
183183
parts = [chunk for chunk in s_common.chunks({1, 2, 3}, 10000)]
184184

185185
# dict is unslicable
186-
with self.assertRaises(TypeError) as cm:
186+
with self.assertRaises((TypeError, KeyError)) as cm:
187187
parts = [chunk for chunk in s_common.chunks({1: 2}, 10000)]
188188

189189
# empty dict is caught during the [0:0] slice
190-
with self.assertRaises(TypeError) as cm:
190+
with self.assertRaises((TypeError, KeyError)) as cm:
191191
parts = [chunk for chunk in s_common.chunks({}, 10000)]
192192

193193
def test_common_ehex_uhex(self):

0 commit comments

Comments
 (0)