Skip to content

Commit e26caaa

Browse files
committed
test_lists: improve test readability (part 3)
Replicates graphql/graphql-js@842eeef
1 parent 485de04 commit e26caaa

File tree

2 files changed

+117
-421
lines changed

2 files changed

+117
-421
lines changed

src/graphql/error/graphql_error.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,17 @@ def __eq__(self, other: Any) -> bool:
154154
isinstance(other, GraphQLError)
155155
and self.__class__ == other.__class__
156156
and all(
157-
getattr(self, slot) == getattr(other, slot) for slot in self.__slots__
157+
getattr(self, slot) == getattr(other, slot)
158+
for slot in self.__slots__
159+
if slot != "original_error"
158160
)
159161
) or (
160162
isinstance(other, dict)
161163
and "message" in other
162164
and all(
163165
slot in self.__slots__ and getattr(self, slot) == other.get(slot)
164166
for slot in other
167+
if slot != "original_error"
165168
)
166169
)
167170

0 commit comments

Comments
 (0)