Skip to content

Commit 934115c

Browse files
committed
Change how class is checked in args __eq__
1 parent 1285f0a commit 934115c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/metaschema/properties/test_ArgsMetaschemaProperty.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def __eq__(self, solf):
1010
import inspect
1111
a_str = f"{self.__module__}.{self.__name__}[{inspect.getfile(self)}]"
1212
b_str = f"{solf.__module__}.{solf.__name__}[{inspect.getfile(solf)}]"
13-
print(f"Dummy __eq__\n a = {a_str}\n b = {b_str}")
13+
print(f"Dummy __eq__ = {a_str == b_str}\n a = {a_str}\n b = {b_str}")
1414
return a_str == b_str
1515

1616
def __hash__(self):
@@ -39,7 +39,7 @@ def __init__(self, a, b, c=0, d=Dummy):
3939
self._input_kwargs = {'c': c, 'd': weakref.ref(d)}
4040

4141
def __eq__(self, solf):
42-
if not isinstance(solf, self.__class__): # pragma: debug
42+
if solf.__class__ != self.__class__: # pragma: debug
4343
return False
4444
print(self._input_args, solf._input_args,
4545
(self._input_args == solf._input_args),

0 commit comments

Comments
 (0)