Skip to content

Unify temporary directory allocation strategy in tests#729

Open
cottsay wants to merge 1 commit intomasterfrom
cottsay/tmp-path
Open

Unify temporary directory allocation strategy in tests#729
cottsay wants to merge 1 commit intomasterfrom
cottsay/tmp-path

Conversation

@cottsay
Copy link
Copy Markdown
Member

@cottsay cottsay commented Mar 31, 2026

This package was previously using three different temporary directory allocation strategies:

  • Manual TemporaryDirectory management
  • pytest tmpdir fixture
  • pytest tmp_path fixture

This commit changes all temporary directory allocation in tests to use the tmp_path fixture, and includes a compatibility definition of that fixture so that the tests will continue to work properly on Enterprise Linux 8.


I'm not expecting a thorough review of this change. Only test files were touched, and the pattern is largely the same in each. The goal here is to move the codebase to more modern testing patterns while maintaining compatibility with the platforms we support. Additionally, the vast majority of the line changes are removing indentation that's no longer necessary.

@cottsay cottsay self-assigned this Mar 31, 2026
@cottsay cottsay added the enhancement New feature or request label Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.21%. Comparing base (aee8364) to head (b59bf65).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #729   +/-   ##
=======================================
  Coverage   87.21%   87.21%           
=======================================
  Files          69       69           
  Lines        4106     4106           
  Branches      709      709           
=======================================
  Hits         3581     3581           
  Misses        414      414           
  Partials      111      111           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This package was previously using three different temporary directory
allocation strategies:
- Manual `TemporaryDirectory` management
- pytest `tmpdir` fixture
- pytest `tmp_path` fixture

This commit changes all temporary directory allocation in tests to use
the `tmp_path` fixture, and includes a compatibility definition of that
fixture so that the tests will continue to work properly on RHEL 8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

1 participant