Skip to content

Use tmp_test_data_dir fixture to remove temporary test files (Correct Branch, closes !525 )

Explanation of changes

There's a tmp_test_data_dir fixture that creates a temporary directory to which tests can write, that directory is then deleted after pytest is done running all the tests. Some tests don't use this fixture and this results in excess temporary directories that are not deleted. We should make sure that pytest keep our hard drives clean by passing the tmp_test_data_dir fixture to tests that don't use them yet. The tmp_test_data_dir pytest fixture is set to autouse and the scope='session' so any test session that is performed passes this function so there is no need to call it in any of the other test functions

Motivation of changes

In current setup all temporary test files are not deleted after testing, changes here will keep hard drive clean and remove all temp files.


Merge checklist

See also merge request guidelines

  • Merge request has been reviewed (in-depth by a knowledgeable contributor), and is approved by a project maintainer.
  • New code is covered by unit tests (or N/A).
  • New code is documented and docstrings use numpydoc format (or N/A).
  • New functionality: considered making private instead of extending public API (or N/A).
  • Public API changed: added @deprecated (or N/A).
  • Tested on hardware (or N/A).
  • CHANGELOG.md and AUTHORS.md have been updated (or N/A).
  • Windows tests in CI pipeline pass (manually triggered by maintainers before merging).

For reference, the issues workflow is described in the contribution guidelines.late from above before submitting a merge request!**

Edited by David Quinn

Merge request reports

Loading