Add more explicit test
This commit is contained in:
parent
5a0491c3e1
commit
be71c30792
|
@ -436,6 +436,18 @@ class TestDarkMagic(object):
|
||||||
|
|
||||||
assert hash(C()) != hash(C())
|
assert hash(C()) != hash(C())
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("slots", [True, False])
|
||||||
|
def test_eq_false(self, slots):
|
||||||
|
"""
|
||||||
|
eq=False makes a class hashable by ID.
|
||||||
|
"""
|
||||||
|
|
||||||
|
@attr.s(eq=False, slots=slots)
|
||||||
|
class C(object):
|
||||||
|
pass
|
||||||
|
|
||||||
|
assert hash(C()) != hash(C())
|
||||||
|
|
||||||
def test_overwrite_base(self):
|
def test_overwrite_base(self):
|
||||||
"""
|
"""
|
||||||
Base classes can overwrite each other and the attributes are added
|
Base classes can overwrite each other and the attributes are added
|
||||||
|
|
Loading…
Reference in New Issue