Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with pytest 8.2 FixtureDef.unittest removal #800

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

bluetech
Copy link
Member

@bluetech bluetech commented Mar 9, 2024

Since pytest 8.2 (still in development) unittest and regular will behave the same, so unittest special handling is no longer needed.

I also added two unrelated cleanup commits I noticed, if you prefer I can remove them.

`SubRequest` is a subclass of `FixtureRequest`, but is currently private
so pytest-asyncio uses `Any` instead. However, `FixtureRequest` typing
is sufficient for our needs, so can use that instead.
bluetech added 2 commits March 9, 2024 22:53
Since pytest 8.2 unittest and regular behave the same, so unittest
special handling is no longer needed.
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.59%. Comparing base (b22d84e) to head (67226d5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #800      +/-   ##
==========================================
+ Coverage   95.01%   95.59%   +0.58%     
==========================================
  Files           2        2              
  Lines         481      477       -4     
  Branches       97       96       -1     
==========================================
- Hits          457      456       -1     
+ Misses         15       12       -3     
  Partials        9        9              

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

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
Copy link
Contributor

@seifertm seifertm left a comment

Choose a reason for hiding this comment

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

Thank you!

The pytest-asyncio CI only tests against the latest stable release of pytest, so I ran the tests against pytest-dev/pytest@532782a to verify it a second time. Works like a charm. Clean up commits are always welcome, too.

I added a changelog entry and I'll release a new version right away to avoid breakage when pytest 8.2 is released.

@seifertm seifertm enabled auto-merge March 19, 2024 06:56
@seifertm seifertm added this pull request to the merge queue Mar 19, 2024
Merged via the queue into pytest-dev:main with commit c34da04 Mar 19, 2024
14 checks passed
ffissore added a commit to ffissore/pytest-asyncio that referenced this pull request Apr 29, 2024
This unblocks all users stuck with 0.21.1 due to pytest-dev#706
@bluetech bluetech deleted the pytest82-compat branch April 29, 2024 07:42
seifertm pushed a commit that referenced this pull request Apr 29, 2024
This unblocks all users stuck with 0.21.1 due to #706
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.

3 participants