MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_is_main_py

Function test_is_main_py

testing/test_doctest.py:1567–1569  ·  view source on GitHub ↗
(tmp_path: Path, name: str, expected: bool)

Source from the content-addressed store, hash-verified

1565 "name, expected", [("__main__.py", True), ("__init__.py", False)]
1566)
1567def test_is_main_py(tmp_path: Path, name: str, expected: bool) -> None:
1568 dunder_main = tmp_path.joinpath(name)
1569 assert _is_main_py(dunder_main) == expected

Callers

nothing calls this directly

Calls 1

_is_main_pyFunction · 0.90

Tested by

no test coverage detected