MCPcopy Create free account
hub / github.com/tox-dev/filelock / test_runtime_without_interpreter_ids

Function test_runtime_without_interpreter_ids

tests/sqlite/test_fork_registry.py:52–56  ·  view source on GitHub ↗
(mocker: MockerFixture, implementation: str)

Source from the content-addressed store, hash-verified

50
51@pytest.mark.parametrize("implementation", ["cpython", "pypy"])
52def test_runtime_without_interpreter_ids(mocker: MockerFixture, implementation: str) -> None:
53 mocker.patch("filelock._sqlite._fork._thread", new=SimpleNamespace())
54 mocker.patch("filelock._sqlite._fork.sys", new=SimpleNamespace(implementation=SimpleNamespace(name=implementation)))
55 mocker.patch("filelock._sqlite._fork.import_module", autospec=True, side_effect=ModuleNotFoundError)
56 assert not _in_subinterpreter()
57
58
59def test_embedded_cpython_without_the_interpreters_module(mocker: MockerFixture) -> None:

Callers

nothing calls this directly

Calls 1

_in_subinterpreterFunction · 0.90

Tested by

no test coverage detected