MCPcopy
hub / github.com/django/django / test_count_equal

Method test_count_equal

tests/utils_tests/test_hashable.py:22–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 self.assertEqual(make_hashable(value), expected)
21
22 def test_count_equal(self):
23 tests = (
24 ({"a": 1, "b": ["a", 1]}, (("a", 1), ("b", ("a", 1)))),
25 ({"a": 1, "b": ("a", [1, 2])}, (("a", 1), ("b", ("a", (1, 2))))),
26 )
27 for value, expected in tests:
28 with self.subTest(value=value):
29 self.assertCountEqual(make_hashable(value), expected)
30
31 def test_unhashable(self):
32 class Unhashable:

Callers

nothing calls this directly

Calls 1

make_hashableFunction · 0.90

Tested by

no test coverage detected