Skip to content

Commit

Permalink
Update markers for PyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
layday committed Mar 8, 2024
1 parent 3cc7568 commit 74fd46d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions tests/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ def test_default_impl_install_cmd_well_formed(
]


@pytest.mark.skipif(IS_PYPY, reason='uv does not declare support for PyPy')
def test_uv_impl_install_cmd_well_formed(
mocker: pytest_mock.MockerFixture,
):
Expand Down Expand Up @@ -238,11 +237,13 @@ def test_requirement_installation(
package_test_flit: str,
env_impl: build.env.EnvImpl | None,
):
if IS_PYPY and env_impl == 'venv+uv':
pytest.xfail('uv cannot find PyPy executable')

with build.env.DefaultIsolatedEnv(env_impl) as env:
env.install([f'test-flit @ {Path(package_test_flit).as_uri()}'])


@pytest.mark.skipif(IS_PYPY, reason='uv does not declare support for PyPy')
def test_uv_missing(
mocker: pytest_mock.MockerFixture,
):
Expand Down
9 changes: 5 additions & 4 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import importlib.util
import os
import os.path
import platform
import re
import shutil
import subprocess
Expand All @@ -18,7 +17,7 @@


IS_WINDOWS = sys.platform.startswith('win')
IS_PYPY3 = platform.python_implementation() == 'PyPy'
IS_PYPY = sys.implementation.name == 'pypy'


INTEGRATION_SOURCES = {
Expand Down Expand Up @@ -93,10 +92,12 @@ def _ignore_folder(base, filenames):
],
)
@pytest.mark.isolated
def test_build(monkeypatch, project, args, call, tmp_path):
def test_build(request, monkeypatch, project, args, call, tmp_path):
if args == ['--env-impl', 'venv+uv'] and IS_PYPY:
pytest.xfail('uv cannot find PyPy executable')
if project in {'build', 'flit'} and '--no-isolation' in args:
pytest.xfail(f"can't build {project} without isolation due to missing dependencies")
if project == 'Solaar' and IS_WINDOWS and IS_PYPY3:
if project == 'Solaar' and IS_WINDOWS and IS_PYPY:
pytest.xfail('Solaar fails building wheels via sdists on Windows on PyPy 3')

monkeypatch.chdir(tmp_path)
Expand Down

0 comments on commit 74fd46d

Please sign in to comment.