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

Code cleanup: drop 'request' argument from async fixtures #270

Merged
merged 1 commit into from Jan 18, 2022

Conversation

asvetlov
Copy link
Contributor

@asvetlov asvetlov commented Jan 17, 2022

The fixture injection is not needed, pytest 6.1.0+ works fine with using request argument from pytest_fixture_setup() hook.

@codecov-commenter
Copy link

Codecov Report

Merging #270 (43cbb6f) into master (4353327) will decrease coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #270      +/-   ##
==========================================
- Coverage   92.45%   92.36%   -0.09%     
==========================================
  Files           3        3              
  Lines         265      262       -3     
  Branches       34       34              
==========================================
- Hits          245      242       -3     
  Misses         13       13              
  Partials        7        7              
Impacted Files Coverage Δ
plugin.py 92.21% <0.00%> (-0.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4353327...43cbb6f. Read the comment docs.

@asvetlov asvetlov marked this pull request as ready for review January 17, 2022 22:12
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.

Good find!

@asvetlov
Copy link
Contributor Author

@seifertm thanks!
To be clear, fixtredef.addfinalizer() does the same work. Actually, request.addfinalizer() calls fixturedef.addfinalizer() internally.

@asvetlov asvetlov merged commit 048a6ed into master Jan 18, 2022
@asvetlov asvetlov deleted the drop-request branch January 18, 2022 22:01
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.

None yet

3 participants