Skip to content

Add compatibility helper for older Pytest versions#47

Merged
cottsay merged 2 commits into
mainfrom
cottsay/old-pytest
May 6, 2026
Merged

Add compatibility helper for older Pytest versions#47
cottsay merged 2 commits into
mainfrom
cottsay/old-pytest

Conversation

@cottsay

@cottsay cottsay commented Apr 10, 2026

Copy link
Copy Markdown
Member

The tmp_path fixture was introduced in Pytest 3.9. Include an explicit definition of that fixture for compatibility with those older Pytest versions. When we're ready to drop support, we can just remove the fixture.

We could test this in GitHub Actions but it would be pretty contrived. I think it would be OK to carry this as a compatibility extension without explicitly testing it in CI, but I'm open to hearing differing opinions.

The `tmp_path` fixture was introduced in Pytest 3.9. Include an explicit
definition of that fixture for compatibility with those older Pytest
versions. When we're ready to drop support, we can just remove the
fixture.
@cottsay cottsay self-assigned this Apr 10, 2026
@cottsay cottsay added the enhancement New feature or request label Apr 10, 2026
@codecov-commenter

codecov-commenter commented Apr 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.64%. Comparing base (78cb048) to head (52a2a68).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
test/conftest.py 50.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
+ Coverage   51.82%   54.64%   +2.81%     
==========================================
  Files          20       22       +2     
  Lines        2678     2853     +175     
  Branches      546      598      +52     
==========================================
+ Hits         1388     1559     +171     
- Misses        971      974       +3     
- Partials      319      320       +1     

☔ 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.

Comment thread test/conftest.py Outdated
@cottsay cottsay marked this pull request as draft April 13, 2026 16:12
@cottsay cottsay marked this pull request as ready for review May 1, 2026 21:50
@cottsay cottsay requested a review from j-rivero May 6, 2026 16:38

@j-rivero j-rivero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice.

@cottsay cottsay merged commit 488c204 into main May 6, 2026
3 checks passed
@cottsay cottsay deleted the cottsay/old-pytest branch May 6, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants