diff --git a/src/_pytest/assertion/util.py b/src/_pytest/assertion/util.py index ed5b01d1d..ecc1274a8 100644 --- a/src/_pytest/assertion/util.py +++ b/src/_pytest/assertion/util.py @@ -151,8 +151,7 @@ def has_default_eq( code_filename = obj.__eq__.__code__.co_filename if isattrs(obj): return "attrs eq generated" in code_filename - if isdatacls(obj): - return code_filename == "" + return code_filename == "" # dataclass def assertrepr_compare(config, op: str, left: Any, right: Any) -> Optional[List[str]]: