From c01bcf4d28e88673aed8706eff3ec7fbed1f63e4 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 7 Feb 2023 18:18:25 -0800 Subject: Ignore labels when provisioning (#2917) Fix https://github.com/tox-dev/tox/issues/2916 --- tests/test_provision.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'tests/test_provision.py') diff --git a/tests/test_provision.py b/tests/test_provision.py index 4a5bc1a2..290e48dc 100644 --- a/tests/test_provision.py +++ b/tests/test_provision.py @@ -195,14 +195,21 @@ def test_provision_no_recreate_json(tox_project: ToxProjectCreator) -> None: def test_provision_plugin_runner(tox_project: ToxProjectCreator, tmp_path: Path, plugin_testenv: str) -> None: """Ensure that testenv runner doesn't affect the provision env.""" log = tmp_path / "out.log" - proj = tox_project({"tox.ini": f"[tox]\nrequires=demo-pkg-inline\n[{plugin_testenv}]\nrunner=example"}) - result_first = proj.run("r", "-e", "py", "--result-json", str(log)) - result_first.assert_success() + proj = tox_project( + {"tox.ini": f"[tox]\nrequires=demo-pkg-inline\nlabels=l=py\n[{plugin_testenv}]\nrunner=example"}, + ) prov_msg = ( f"ROOT: will run in automatically provisioned tox, host {sys.executable} is missing" f" [requires (has)]: demo-pkg-inline" ) - assert prov_msg in result_first.out + + result_env = proj.run("r", "-e", "py", "--result-json", str(log)) + result_env.assert_success() + assert prov_msg in result_env.out + + result_label = proj.run("r", "-m", "l", "--result-json", str(log)) + result_label.assert_success() + assert prov_msg in result_label.out @pytest.mark.integration() -- cgit v1.2.1