Files
pytest2/testing/example_scripts/issue88_initial_file_multinodes/conftest.py
2024-06-20 11:03:03 +02:00

19 lines
387 B
Python

# mypy: allow-untyped-defs
from __future__ import annotations
import pytest
class MyFile(pytest.File):
def collect(self):
return [MyItem.from_parent(name="hello", parent=self)]
def pytest_collect_file(file_path, parent):
return MyFile.from_parent(path=file_path, parent=parent)
class MyItem(pytest.Item):
def runtest(self):
raise NotImplementedError()