(tox_project: ToxProjectCreator, tmp_path: Path)
| 58 | |
| 59 | |
| 60 | def test_custom_root_dir(tox_project: ToxProjectCreator, tmp_path: Path) -> None: |
| 61 | project = tox_project({}) |
| 62 | |
| 63 | expected_tox_root = tmp_path |
| 64 | expected_work_dir = expected_tox_root / ".tox" |
| 65 | |
| 66 | outcome = project.run("c", "--root", str(expected_tox_root)) |
| 67 | outcome.assert_success() |
| 68 | |
| 69 | assert outcome.state.conf.options.root_dir == expected_tox_root, "should parse the --root argument" |
| 70 | |
| 71 | assert outcome.state.conf.core["tox_root"] == expected_tox_root, f"should set tox_root to {expected_tox_root}" |
| 72 | |
| 73 | # values that depend on tox_root should also be updated |
| 74 | |
| 75 | assert outcome.state.conf.core["work_dir"] == expected_work_dir |
| 76 | assert outcome.state.conf.core["temp_dir"] == expected_work_dir / ".tmp" |
| 77 | |
| 78 | env_conf = outcome.state.conf.get_env("py") |
| 79 | |
| 80 | assert env_conf["env_dir"] == expected_work_dir / "py" |
| 81 | assert env_conf["env_log_dir"] == expected_work_dir / "py" / "log" |
| 82 | assert env_conf["env_tmp_dir"] == expected_work_dir / "py" / "tmp" |
| 83 | |
| 84 | |
| 85 | def test_custom_root_dir_and_work_dir(tox_project: ToxProjectCreator, tmp_path: Path) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…