File tree 1 file changed +3
-17
lines changed
1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change
1
+ import pytest
1
2
import shutil
2
3
from pathlib import Path
3
4
from tempfile import TemporaryDirectory
4
5
5
6
6
- import pytest
7
-
8
-
9
7
@pytest .fixture
10
8
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
-
24
9
# Copy the test project to a tmp dir to make every test session independent
25
10
with TemporaryDirectory () as tmpdir :
26
- # source_dir = Path(__file__).resolve().parent / "_utils/test_project"
11
+ source_dir = Path (__file__ ).resolve ().parent / "_utils/test_project"
27
12
tmp_project = Path (tmpdir ) / "hatch-frozen-test-project"
28
13
shutil .copytree (source_dir , tmp_project )
29
14
30
15
pyproject_toml = tmp_project / "pyproject.toml"
16
+ plugin_root_dir = Path (__file__ ).resolve ().parent .parent
31
17
with open (pyproject_toml , "r" ) as f :
32
18
content = f .read ()
33
19
new_content = content .replace (
You can’t perform that action at this time.
0 commit comments