Skip to content

Commit ef67e0e

Browse files
dnicolodiFFY00
authored andcommitted
TST: enable tests using venv unconditionally
Issues with venv setup have been solved on all platforms. Signed-off-by: Filipe Laíns <[email protected]>
1 parent b236346 commit ef67e0e

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

tests/conftest.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import os
55
import os.path
66
import pathlib
7-
import platform
87
import shutil
98
import tempfile
109

@@ -83,12 +82,6 @@ def venv():
8382
shutil.rmtree(path)
8483

8584

86-
# On Linux and macOS the venv creation fails when pip is installed in the newly created environment:
87-
# subprocess.check_output(['{venv}/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip'], ...)
88-
# fails with "ModuleNotFoundError: No module named 'encodings'"
89-
venv_supported = platform.python_implementation() != 'PyPy' or platform.system() not in {'Linux', 'Darwin'}
90-
91-
9285
def generate_package_fixture(package):
9386
@pytest.fixture
9487
def fixture():

tests/docs/examples/test_spam.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55

66
import mesonpy
77

8-
from ...conftest import venv_supported
98
from .conftest import build_project_wheel, examples_dir
109

1110

12-
@pytest.mark.skipif(not venv_supported, reason='Cannot setup venv')
1311
def test_build_and_import(venv, tmp_dir_session):
1412
"""Test that the wheel for the spam example builds, installs, and imports."""
1513

tests/test_wheel.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
import mesonpy._elf
1515

16-
from .conftest import venv_supported
17-
1816

1917
EXT_SUFFIX = sysconfig.get_config_var('EXT_SUFFIX')
2018
INTERPRETER_VERSION = f'{sys.version_info[0]}{sys.version_info[1]}'
@@ -171,7 +169,6 @@ def test_configure_data(wheel_configure_data):
171169
}
172170

173171

174-
@pytest.mark.skipif(not venv_supported, reason='Cannot setup venv')
175172
@pytest.mark.skipif(platform.system() != 'Linux', reason='Unsupported on this platform for now')
176173
def test_local_lib(venv, wheel_link_against_local_lib):
177174
subprocess.check_call([

0 commit comments

Comments
 (0)