Skip to content

Commit c4d58f8

Browse files
authored
Use .tox instead of .tox/4 as work dir (#2347)
1 parent 86f48a5 commit c4d58f8

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ jobs:
6262
DIFF_AGAINST: HEAD
6363
- name: Rename coverage report file
6464
run: |
65-
import os; os.rename('.tox/4/coverage.{}.xml'.format(os.environ['TOXENV']), '.tox/4/coverage.xml')
65+
import os; os.rename('.tox/coverage.{}.xml'.format(os.environ['TOXENV']), '.tox/coverage.xml')
6666
shell: python
6767
- uses: codecov/codecov-action@v1
6868
with:
69-
file: ./.tox/4/coverage.xml
69+
file: ./.tox/coverage.xml
7070
flags: tests
7171
name: ${{ matrix.py }} - ${{ matrix.os }}
7272

docs/changelog/2346.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use ``.tox`` as working directory instead of ``.tox/4`` - by :user:`gaborbernat`.

src/tox/config/sets.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ def register_config(self) -> None:
188188
)
189189

190190
def work_dir_builder(conf: Config, env_name: str | None) -> Path: # noqa: U100
191-
# here we pin to .tox/4 to be able to use in parallel with v3 until final release
192-
return (conf.work_dir if conf.work_dir is not None else cast(Path, self["tox_root"])) / ".tox" / "4"
191+
return (conf.work_dir if conf.work_dir is not None else cast(Path, self["tox_root"])) / ".tox"
193192

194193
self.add_config(
195194
keys=["work_dir", "toxworkdir"],

tests/session/cmd/test_sequential.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def test_sequential_inserted_env_vars(tox_project: ToxProjectCreator, demo_pkg_i
432432

433433
assert re.search(f"TOX_PACKAGE={re.escape(str(project.path))}.*.tar.gz{os.linesep}", result.out)
434434
assert f"TOX_ENV_NAME=py{os.linesep}" in result.out
435-
work_dir = project.path / ".tox" / "4"
435+
work_dir = project.path / ".tox"
436436
assert f"TOX_WORK_DIR={work_dir}{os.linesep}" in result.out
437437
env_dir = work_dir / "py"
438438
assert f"TOX_ENV_DIR={env_dir}{os.linesep}" in result.out

tests/tox_env/test_tox_env_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_env_log(tox_project: ToxProjectCreator) -> None:
3838
result_first = prj.run("r")
3939
result_first.assert_success()
4040

41-
log_dir = prj.path / ".tox" / "4" / "py" / "log"
41+
log_dir = prj.path / ".tox" / "py" / "log"
4242
assert log_dir.exists(), result_first.out
4343

4444
filename = {i.name for i in log_dir.iterdir()}

0 commit comments

Comments
 (0)