|
5 | 5 | import pytest |
6 | 6 |
|
7 | 7 |
|
8 | | -@pytest.fixture(scope="function") |
9 | | -def temp_dir_print_info(tmp_path_factory): |
10 | | - root_temp_dir = tmp_path_factory.mktemp("temp") |
11 | | - examples_dir = root_temp_dir / "docs" / "examples" |
12 | | - packs_dir = root_temp_dir / "requirements" / "packs" |
13 | | - packs_dir.mkdir(parents=True, exist_ok=True) |
14 | | - fake_env = root_temp_dir / "fake_env" |
15 | | - fake_env.mkdir(parents=True, exist_ok=True) |
16 | | - |
17 | | - (packs_dir / "packa.txt").write_text("packaging") |
18 | | - (packs_dir / "packb.txt").write_text("matplotlib") |
19 | | - (examples_dir / "packA" / "ex1").mkdir(parents=True, exist_ok=True) |
20 | | - (examples_dir / "packA" / "ex2").mkdir(parents=True, exist_ok=True) |
21 | | - (examples_dir / "packB" / "ex1").mkdir(parents=True, exist_ok=True) |
22 | | - (examples_dir / "packB" / "ex3").mkdir(parents=True, exist_ok=True) |
23 | | - (examples_dir / "packB" / "ex4").mkdir(parents=True, exist_ok=True) |
24 | | - |
25 | | - yield root_temp_dir |
26 | | - |
27 | | - |
28 | 8 | @pytest.fixture(scope="function") |
29 | 9 | def example_cases(tmp_path_factory): |
30 | 10 | """Copy the entire examples tree into a temp directory once per test |
@@ -116,6 +96,12 @@ def example_cases(tmp_path_factory): |
116 | 96 | case5req_dir = root_temp_dir / "case5" / "requirements" / "packs" |
117 | 97 | case5req_dir.mkdir(parents=True, exist_ok=True) |
118 | 98 |
|
| 99 | + case5req_dir = root_temp_dir / "requirements" / "packs" |
| 100 | + fake_env = root_temp_dir / "case5" / "fake_env" |
| 101 | + fake_env.mkdir(parents=True, exist_ok=True) |
| 102 | + (case5req_dir / "packa.txt").write_text("packaging") |
| 103 | + (case5req_dir / "packb.txt").write_text("numpy") |
| 104 | + |
119 | 105 | yield root_temp_dir |
120 | 106 |
|
121 | 107 |
|
|
0 commit comments