Skip to content

Commit 2997de6

Browse files
committed
parametrize setup examples tests
1 parent da94020 commit 2997de6

File tree

2 files changed

+248
-344
lines changed

2 files changed

+248
-344
lines changed

tests/fixtures/examples.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""
2+
Fixtures specifically for help testing the modules in the examples/ directory.
3+
"""
4+
5+
import os
6+
import pytest
7+
8+
@pytest.fixture(scope="session")
9+
def examples_testing_dir(temp_output_dir: str) -> str:
10+
"""
11+
Fixture to create a temporary output directory for tests related to the examples functionality.
12+
13+
:param temp_output_dir: The path to the temporary output directory we'll be using for this test run
14+
:returns: The path to the temporary testing directory for examples tests
15+
"""
16+
testing_dir = f"{temp_output_dir}/examples_testing"
17+
if not os.path.exists(testing_dir):
18+
os.mkdir(testing_dir)
19+
20+
return testing_dir

0 commit comments

Comments
 (0)