Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
MarkDecorator __eq__ override can lead to bad side effects #2758
import pytest TEST_DATA = ['a', 'b', 'c', pytest.mark.xfail('d')] SUBSET_TESTS = [x for x in TEST_DATA if x in ('a', 'b')] @pytest.mark.parametrize('data', SUBSET_TESTS) def test_me(data): pass
You'll get an error on collection:
return self.mark == other.mark E AttributeError: 'str' object has no attribute 'mark'
This affects sets, lists (including