Skip to content

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

Merged
asvetlov merged 1 commit intomasterfrom
drop-request
Jan 18, 2022
Merged

Code cleanup: drop 'request' argument from async fixtures#270
asvetlov merged 1 commit intomasterfrom
drop-request

Conversation

@asvetlov
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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.

3 participants