From 852d532b150851b6a93444dc1b352beb09688e44 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Tue, 4 Oct 2022 22:18:10 +0200 Subject: [PATCH] tox: Set `--basetemp` to work around `MAX_PATH` limitation on Windows --- tox.ini | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 7f43e41e4..a8f0f72f6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,22 @@ [tox] -envlist = py37,py38,pypy3,pre-commit +# Platform specification support is available since version 2.0, see: +# https://tox.wiki/en/latest/example/platform.html#basic-multi-platform-example +minversion = 2.0 +envlist = {py37,py38,pypy3}-{unix,windows},pre-commit [testenv] deps = -rrequirements-dev.txt passenv = APPDATA HOME LOCALAPPDATA PROGRAMFILES RUSTUP_HOME +platform = + unix: darwin|cygwin|linux\d*|aix\d*|sunos\d*|freebsd\d* + windows: win32 commands = - coverage erase - coverage run -m pytest {posargs:tests} - coverage report + unix: coverage erase + coverage run -m pytest --basetemp="/tmp/pytest-{envname}" {posargs:tests} + coverage report + windows: coverage erase + coverage run -m pytest --basetemp="C:\tmp\pytest-{envname}" {posargs:tests} + coverage report [testenv:pre-commit] skip_install = true