test_ok2/testing/example_scripts/fixtures/custom_item/conftest.py

16 lines
304 B
Python
Raw Normal View History

import pytest
class CustomItem(pytest.Item):
def runtest(self):
pass
class CustomFile(pytest.File):
def collect(self):
yield CustomItem.from_parent(name="foo", parent=self)
def pytest_collect_file(path, parent):
return CustomFile.from_parent(fspath=path, parent=parent)