summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMasen Furer <m_github@0x26.net>2023-01-17 07:13:55 -0800
committerGitHub <noreply@github.com>2023-01-17 07:13:55 -0800
commit2a87375617a228d655b31856c6a39d9957fb9484 (patch)
treeeeee6ae341b10ac92eaf80ad233c7d88983d7a18 /tests
parent1ba041908fa9c225840aafa4cbc01fd6521e804b (diff)
downloadtox-git-2a87375617a228d655b31856c6a39d9957fb9484.tar.gz
Provision cwd (#2877)
Fix https://github.com/tox-dev/tox/issues/2876
Diffstat (limited to 'tests')
-rw-r--r--tests/test_provision.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_provision.py b/tests/test_provision.py
index 91d7689d..4a5bc1a2 100644
--- a/tests/test_provision.py
+++ b/tests/test_provision.py
@@ -212,3 +212,17 @@ def test_provision_plugin_runner_in_provision(tox_project: ToxProjectCreator, tm
proj = tox_project({"tox.ini": "[tox]\nrequires=somepkg123xyz\n[testenv:.tox]\nrunner=example"})
with pytest.raises(KeyError, match="example"):
proj.run("r", "-e", "py", "--result-json", str(log))
+
+
+@pytest.mark.integration()
+@pytest.mark.usefixtures("_pypi_index_self")
+@pytest.mark.parametrize("relative_path", [True, False], ids=["relative", "absolute"])
+def test_provision_conf_file(tox_project: ToxProjectCreator, tmp_path: Path, relative_path: bool) -> None:
+ ini = "[tox]\nrequires = demo-pkg-inline\nskipsdist=true\n"
+ project = tox_project({"tox.ini": ini}, prj_path=tmp_path / "sub")
+ if relative_path:
+ conf_path = os.path.join(project.path.name, "tox.ini")
+ else:
+ conf_path = str(project.path / "tox.ini")
+ result = project.run("c", "--conf", conf_path, "-e", "py", from_cwd=tmp_path)
+ result.assert_success()