MCPcopy Index your code
hub / github.com/ipython/ipython / pytest_collect_file

Function pytest_collect_file

IPython/testing/plugin/pytest_ipdoctest.py:133–147  ·  view source on GitHub ↗
(
    file_path: Path,
    parent: Collector,
)

Source from the content-addressed store, hash-verified

131
132
133def pytest_collect_file(
134 file_path: Path,
135 parent: Collector,
136) -> Optional[Union["IPDoctestModule", "IPDoctestTextfile"]]:
137 config = parent.config
138 if file_path.suffix == ".py":
139 if config.option.ipdoctestmodules and not any(
140 (_is_setup_py(file_path), _is_main_py(file_path))
141 ):
142 mod: IPDoctestModule = IPDoctestModule.from_parent(parent, path=file_path)
143 return mod
144 elif _is_ipdoctest(config, file_path, parent):
145 txt: IPDoctestTextfile = IPDoctestTextfile.from_parent(parent, path=file_path)
146 return txt
147 return None
148
149
150if pytest_version[0] < 7:

Callers

nothing calls this directly

Calls 4

_is_setup_pyFunction · 0.85
_is_main_pyFunction · 0.85
_is_ipdoctestFunction · 0.85
from_parentMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…