Skip to content

Commit 0b791cf

Browse files
committed
Merge branch 'main' into add-github-actions
2 parents 3b7083e + 3d18eed commit 0b791cf

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

tests/conftest.py

+3-17
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
1+
import pytest
12
import shutil
23
from pathlib import Path
34
from tempfile import TemporaryDirectory
45

56

6-
import pytest
7-
8-
97
@pytest.fixture
108
def test_project():
11-
source_dir = Path(__file__).resolve().parent / "_utils/test_project"
12-
pyproject_toml = source_dir / "pyproject.toml"
13-
plugin_root_dir = Path(__file__).resolve().parent.parent
14-
# with open(pyproject_toml, "r") as f:
15-
# content = f.read()
16-
# new_content = content.replace(
17-
# "<<<hatch_frozen_cwd>>>", plugin_root_dir.as_uri()
18-
# )
19-
# with open(pyproject_toml, "w") as f:
20-
# f.write(new_content)
21-
22-
# return source_dir
23-
249
# Copy the test project to a tmp dir to make every test session independent
2510
with TemporaryDirectory() as tmpdir:
26-
# source_dir = Path(__file__).resolve().parent / "_utils/test_project"
11+
source_dir = Path(__file__).resolve().parent / "_utils/test_project"
2712
tmp_project = Path(tmpdir) / "hatch-frozen-test-project"
2813
shutil.copytree(source_dir, tmp_project)
2914

3015
pyproject_toml = tmp_project / "pyproject.toml"
16+
plugin_root_dir = Path(__file__).resolve().parent.parent
3117
with open(pyproject_toml, "r") as f:
3218
content = f.read()
3319
new_content = content.replace(

0 commit comments

Comments
 (0)