Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/attr/_next_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def define(
kw_only=False,
cache_hash=False,
auto_exc=True,
eq=True,
eq=None,
order=False,
auto_detect=True,
getstate_setstate=None,
Expand Down
15 changes: 15 additions & 0 deletions tests/test_next_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,18 @@ class F:

with pytest.raises(attr.exceptions.FrozenInstanceError):
f.x = 2

def test_auto_detect_eq(self):
"""
auto_detect=True works for eq.

Regression test for #670.
"""

@attr.define
class C:
def __eq__(self, o):
raise ValueError()

with pytest.raises(ValueError):
C() == C()