We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c45065 commit 0ea039dCopy full SHA for 0ea039d
testing/test_assertion.py
@@ -1016,6 +1016,22 @@ class SimpleDataObjectTwo:
1016
lines = callequal(left, right)
1017
assert lines is None
1018
1019
+ def test_attrs_with_auto_detect_and_custom_eq(self) -> None:
1020
+ @attr.s(
1021
+ auto_detect=True
1022
+ ) # attr.s doesn’t ignore a custom eq if auto_detect=True
1023
+ class SimpleDataObject:
1024
+ field_a = attr.ib()
1025
+
1026
+ def __eq__(self, other): # pragma: no cover
1027
+ return super().__eq__(other)
1028
1029
+ left = SimpleDataObject(1)
1030
+ right = SimpleDataObject(2)
1031
+ # issue 9362
1032
+ lines = callequal(left, right, verbose=2)
1033
+ assert lines is None
1034
1035
def test_attrs_with_custom_eq(self) -> None:
1036
@attr.define
1037
class SimpleDataObject:
0 commit comments