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-12-03 20:14:09 +08:00
|
|
|
def pytest_collect_file(file_path, parent):
|
|
|
|
return MyFile.from_parent(path=file_path, parent=parent)
|
2018-06-27 04:59:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
class MyItem(pytest.Item):
|
2023-12-07 00:27:17 +08:00
|
|
|
def runtest(self):
|
|
|
|
raise NotImplementedError()
|