def test_marked_class_run_twice(testdir, request):
 py_file = testdir.makepyfile("\n    import pytest\n    @pytest.mark.parametrize('abc', [1, 2, 3])\n    class Test1(object):\n        def test_1(self, abc):\n            assert abc in [1, 2, 3]\n    ")
 file_name = os.path.basename(py_file.strpath)
 rec = testdir.inline_run(file_name, file_name)
 rec.assertoutcome(passed=6)

def test_marked_class_run_twice ( testdir , request ) : py_file = testdir . makepyfile ( "\n    import pytest\n    @pytest.mark.parametrize('abc', [1, 2, 3])\n    class Test1(object):\n        def test_1(self, abc):\n            assert abc in [1, 2, 3]\n    " ) file_name = os . path . basename ( py_file . strpath ) rec = testdir . inline_run ( file_name , file_name ) rec . assertoutcome ( passed = 6 )
test fails file is run twice that contains marked class .