diff --git a/.github/workflows/reusable-pytest.yml b/.github/workflows/reusable-pytest.yml index 414a91fe..220ceb43 100644 --- a/.github/workflows/reusable-pytest.yml +++ b/.github/workflows/reusable-pytest.yml @@ -43,6 +43,17 @@ jobs: with: fetch-depth: 0 + - name: Setup uv + uses: astral-sh/setup-uv@v4 + + - name: Install tox (uv) + if: matrix.py != 'pypy3.8' + run: uv tool install tox --with tox-uv + + - name: Install tox (pypy 3.8) + if: matrix.py == 'pypy3.8' + run: uv tool install tox + - name: Setup python for test ${{ matrix.py }} uses: actions/setup-python@v5 with: @@ -65,14 +76,6 @@ jobs: file.write(env) shell: python - - name: Setup python for tox - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Install tox - run: python -m pip install tox - - name: Run test suite via tox if: matrix.tox-target == 'tox' run: | diff --git a/tests/test_env.py b/tests/test_env.py index beade335..ca37e243 100644 --- a/tests/test_env.py +++ b/tests/test_env.py @@ -46,7 +46,11 @@ def test_can_get_venv_paths_with_conflicting_default_scheme( assert get_scheme_names.call_count == 1 -@pytest.mark.skipif('posix_local' not in sysconfig.get_scheme_names(), reason='workaround for Debian/Ubuntu Python') +SCHEME_NAMES = sysconfig.get_scheme_names() + + +@pytest.mark.skipif('posix_local' not in SCHEME_NAMES, reason='workaround for Debian/Ubuntu Python') +@pytest.mark.skipif('venv' in SCHEME_NAMES, reason='different call if venv is in scheme names') def test_can_get_venv_paths_with_posix_local_default_scheme( mocker: pytest_mock.MockerFixture, ):