MCPcopy
hub / github.com/tox-dev/tox / test_provision_plugin_runner

Function test_provision_plugin_runner

tests/test_provision.py:252–269  ·  view source on GitHub ↗

Ensure that testenv runner doesn't affect the provision env.

(tox_project: ToxProjectCreator, tmp_path: Path, plugin_testenv: str)

Source from the content-addressed store, hash-verified

250@pytest.mark.usefixtures("_pypi_index_self")
251@pytest.mark.parametrize("plugin_testenv", ["testenv", "testenv:a"])
252def test_provision_plugin_runner(tox_project: ToxProjectCreator, tmp_path: Path, plugin_testenv: str) -> None:
253 """Ensure that testenv runner doesn't affect the provision env."""
254 log = tmp_path / "out.log"
255 proj = tox_project(
256 {"tox.ini": f"[tox]\nrequires=demo-pkg-inline\nlabels=l=py\n[{plugin_testenv}]\nrunner=example"},
257 )
258 prov_msg = (
259 f"ROOT: will run in automatically provisioned tox, host {sys.executable} is missing"
260 f" [requires (has)]: demo-pkg-inline"
261 )
262
263 result_env = proj.run("r", "-e", "py", "--result-json", str(log))
264 result_env.assert_success()
265 assert prov_msg in result_env.out
266
267 result_label = proj.run("r", "-m", "l", "--result-json", str(log))
268 result_label.assert_success()
269 assert prov_msg in result_label.out
270
271
272@pytest.mark.integration

Callers

nothing calls this directly

Calls 2

runMethod · 0.45
assert_successMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…