(self)
| 4 | |
| 5 | class TestHashable(SimpleTestCase): |
| 6 | def test_equal(self): |
| 7 | tests = ( |
| 8 | ([], ()), |
| 9 | (["a", 1], ("a", 1)), |
| 10 | ({}, ()), |
| 11 | ({"a"}, ("a",)), |
| 12 | (frozenset({"a"}), {"a"}), |
| 13 | ({"a": 1, "b": 2}, (("a", 1), ("b", 2))), |
| 14 | ({"b": 2, "a": 1}, (("a", 1), ("b", 2))), |
| 15 | (("a", ["b", 1]), ("a", ("b", 1))), |
| 16 | (("a", {"b": 1}), ("a", (("b", 1),))), |
| 17 | ) |
| 18 | for value, expected in tests: |
| 19 | with self.subTest(value=value): |
| 20 | self.assertEqual(make_hashable(value), expected) |
| 21 | |
| 22 | def test_count_equal(self): |
| 23 | tests = ( |
nothing calls this directly
no test coverage detected