2018-06-27 04:59:40 +08:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
|
|
class MyFile(pytest.File):
|
|
|
|
def collect(self):
|
2020-07-23 08:36:51 +08:00
|
|
|
return [MyItem.from_parent(name="hello", parent=self)]
|
2018-06-27 04:59:40 +08:00
|
|
|
|
|
|
|
|
2021-03-15 04:20:53 +08:00
|
|
|
def pytest_collect_file(fspath, parent):
|
|
|
|
return MyFile.from_parent(path=fspath, parent=parent)
|
2018-06-27 04:59:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
class MyItem(pytest.Item):
|
|
|
|
pass
|