Skip to content

Commit 5efb571

Browse files
committed
add req files to case5 dir
1 parent 794c93e commit 5efb571

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

tests/conftest.py

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,6 @@
55
import pytest
66

77

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-
288
@pytest.fixture(scope="function")
299
def example_cases(tmp_path_factory):
3010
"""Copy the entire examples tree into a temp directory once per test
@@ -116,6 +96,12 @@ def example_cases(tmp_path_factory):
11696
case5req_dir = root_temp_dir / "case5" / "requirements" / "packs"
11797
case5req_dir.mkdir(parents=True, exist_ok=True)
11898

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+
119105
yield root_temp_dir
120106

121107

0 commit comments

Comments
 (0)