Skip to content

Run repository-creating tests in temp dirs - #122

Merged
schmoelder merged 2 commits into
mainfrom
isolate-test-repositories
Aug 13, 2026
Merged

Run repository-creating tests in temp dirs#122
schmoelder merged 2 commits into
mainfrom
isolate-test-repositories

Conversation

@schmoelder

Copy link
Copy Markdown
Contributor

Several tests create CADET-RDM repositories through relative paths such as test_repo* and non_rdm_repo. When those tests run from the repository root, the generated repositories are left behind as untracked files after the test run.

This adds module-local autouse fixtures that change the working directory to pytest's per-test tmp_path for the affected test modules. The tests can keep their existing relative-path setup, but the generated repositories now land in pytest-managed temporary directories instead of polluting the project checkout.

Tested with:
pytest tests/test_git_adapter.py tests/test_cli.py tests/test_batch_runner.py -m 'not server_api and not container'

@schmoelder
schmoelder merged commit 4aa07d3 into main Aug 13, 2026
5 checks passed
@schmoelder
schmoelder deleted the isolate-test-repositories branch August 13, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant