Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/4115.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Run each test in its own directory
10 changes: 8 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,18 @@ def pytest_collection_finish(session):

@pytest.fixture(autouse=True)
def run_before_each_test(
monkeypatch: pytest.MonkeyPatch, request: pytest.FixtureRequest
) -> None:
tmp_path,
monkeypatch: pytest.MonkeyPatch,
request: pytest.FixtureRequest,
):
monkeypatch.setenv("PYFLUENT_TEST_NAME", request.node.name)
monkeypatch.setenv("PYFLUENT_CODEGEN_SKIP_BUILTIN_SETTINGS", "1")
pyfluent.CONTAINER_MOUNT_SOURCE = pyfluent.EXAMPLES_PATH
pyfluent.CONTAINER_MOUNT_TARGET = pyfluent.EXAMPLES_PATH
original_cwd = os.getcwd()
monkeypatch.chdir(tmp_path)
yield
os.chdir(original_cwd)


class Helpers:
Expand Down