Skip to content

Commit

Permalink
3.12 Account for slice objet being hashable python/cpython#84783
Browse files Browse the repository at this point in the history
  • Loading branch information
vEpiphyte committed Sep 25, 2023
1 parent b53ee4f commit 076e6c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ def test_common_chunks(self):
parts = [chunk for chunk in s_common.chunks({1, 2, 3}, 10000)]

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

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

def test_common_ehex_uhex(self):
Expand Down

0 comments on commit 076e6c3

Please sign in to comment.