Skip to content

Commit fa42e21

Browse files
committed
Remove Fresh Environment
1 parent b7e5d07 commit fa42e21

File tree

2 files changed

+9
-27
lines changed

2 files changed

+9
-27
lines changed

tests/integration/examples/test_conan_cmake.py

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,31 @@ class TestConanCMake:
1616
"""Test project variation of conan and CMake"""
1717

1818
@staticmethod
19-
def test_simple(example_runner: CliRunner, fresh_environment: dict[str, str]) -> None:
19+
def test_simple(example_runner: CliRunner) -> None:
2020
"""Simple project"""
2121
# By nature of running the test, we require PDM to develop the project and so it will be installed
22-
result = subprocess.run(
23-
['pdm', 'install', '--plugins'], capture_output=True, text=True, env=fresh_environment, check=False
24-
)
25-
26-
assert result.returncode == 0, f'PDM plugin installation failed: {result.stderr}'
27-
28-
result = subprocess.run(['pdm', 'install'], capture_output=True, text=True, env=fresh_environment, check=False)
22+
result = subprocess.run(['pdm', 'install'], capture_output=True, text=True, check=False)
2923

3024
assert result.returncode == 0, f'PDM install failed: {result.stderr}'
3125

3226
# Run the CMake configuration command
33-
result = subprocess.run(
34-
['cmake', '--preset=default'], capture_output=True, text=True, env=fresh_environment, check=False
35-
)
27+
result = subprocess.run(['cmake', '--preset=default'], capture_output=True, text=True, check=False)
3628

3729
assert result.returncode == 0, f'Cmake failed: {result.stderr}'
3830

3931
# Verify that the build directory contains the expected files
4032
assert (Path('build') / 'CMakeCache.txt').exists(), 'build/CMakeCache.txt not found'
4133

4234
@staticmethod
43-
def test_inject(example_runner: CliRunner, fresh_environment: dict[str, str]) -> None:
35+
def test_inject(example_runner: CliRunner) -> None:
4436
"""Inject"""
4537
# By nature of running the test, we require PDM to develop the project and so it will be installed
46-
result = subprocess.run(
47-
['pdm', 'install', '--plugins'], capture_output=True, text=True, env=fresh_environment, check=False
48-
)
49-
50-
assert result.returncode == 0, f'PDM plugin installation failed: {result.stderr}'
51-
52-
result = subprocess.run(['pdm', 'install'], capture_output=True, text=True, env=fresh_environment, check=False)
38+
result = subprocess.run(['pdm', 'install'], capture_output=True, text=True, check=False)
5339

5440
assert result.returncode == 0, f'PDM install failed: {result.stderr}'
5541

5642
# Run the CMake configuration command
57-
result = subprocess.run(
58-
['cmake', '--preset=default'], capture_output=True, text=True, env=fresh_environment, check=False
59-
)
43+
result = subprocess.run(['cmake', '--preset=default'], capture_output=True, text=True, check=False)
6044

6145
assert result.returncode == 0, f'Cmake failed: {result.stderr}'
6246

tests/integration/examples/test_vcpkg_cmake.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,15 @@ class TestVcpkgCMake:
1818

1919
@staticmethod
2020
@pytest.mark.skip(reason='TODO')
21-
def test_simple(example_runner: CliRunner, fresh_environment: dict[str, str]) -> None:
21+
def test_simple(example_runner: CliRunner) -> None:
2222
"""Simple project"""
2323
# By nature of running the test, we require PDM to develop the project and so it will be installed
24-
result = subprocess.run(['pdm', 'install'], capture_output=True, text=True, env=fresh_environment, check=False)
24+
result = subprocess.run(['pdm', 'install'], capture_output=True, text=True, check=False)
2525

2626
assert result.returncode == 0, f'PDM install failed: {result.stderr}'
2727

2828
# Run the CMake configuration command
29-
result = subprocess.run(
30-
['cmake', '--preset=default'], capture_output=True, text=True, env=fresh_environment, check=False
31-
)
29+
result = subprocess.run(['cmake', '--preset=default'], capture_output=True, text=True, check=False)
3230

3331
assert result.returncode == 0, f'Cmake failed: {result.stderr}'
3432

0 commit comments

Comments
 (0)