If `hash` is False on an attribute, ignore that attribute.
(self, slots, cache_hash)
| 534 | |
| 535 | @given(booleans(), booleans()) |
| 536 | def test_hash_attribute(self, slots, cache_hash): |
| 537 | """ |
| 538 | If `hash` is False on an attribute, ignore that attribute. |
| 539 | """ |
| 540 | C = make_class( |
| 541 | "C", |
| 542 | {"a": attr.ib(hash=False), "b": attr.ib()}, |
| 543 | slots=slots, |
| 544 | unsafe_hash=True, |
| 545 | cache_hash=cache_hash, |
| 546 | ) |
| 547 | |
| 548 | assert hash(C(1, 2)) == hash(C(2, 2)) |
| 549 | |
| 550 | @given(booleans()) |
| 551 | def test_hash_attribute_mirrors_eq(self, eq): |
nothing calls this directly
no test coverage detected