* Rename pytest_ignore_collect fspath parameter to collection_path * Rename pytest_collect_file fspath parameter to file_path * Rename pytest_pycollect_makemodule fspath parameter to module_path * Rename pytest_report_header startpath parameter to start_path * Rename pytest_report_collectionfinish startpath parameter to start_path * Update docs with the renamed parameters * Use pytest-flakes fork temporarily to prove it works * Use pytest-flakes 4.0.5
16 lines
312 B
Python
16 lines
312 B
Python
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(file_path, parent):
|
|
return CustomFile.from_parent(path=file_path, parent=parent)
|