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.
2 parents 986df35 + f1fb6c8 commit 5fd987dCopy full SHA for 5fd987d
pytest_lazyfixture.py
@@ -194,4 +194,6 @@ def __repr__(self):
194
return '<{} "{}">'.format(self.__class__.__name__, self.name)
195
196
def __eq__(self, other):
197
- return self.name == other.name
+ if isinstance(other, LazyFixture):
198
+ return self.name == other.name
199
+ return NotImplemented
tests/test_lazyfixture.py
@@ -904,3 +904,9 @@ def test_the_thing(data):
904
assert 'test_the_thing[foo]' in stdout
905
assert 'test_the_thing[bar-spam]' in stdout
906
assert 'test_the_thing[bar-eggs]' in stdout
907
+
908
909
+def test_eq():
910
+ assert lazy_fixture("Lol") == lazy_fixture("Lol")
911
+ assert lazy_fixture("Lol") != lazy_fixture("Wut")
912
+ assert lazy_fixture("Lol") != 123
0 commit comments