Skip to content

Call pytest_report_collectionfinish hook when --collect-only is passed #4725

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

Merged
merged 1 commit into from
Feb 6, 2019

Conversation

nicoddemus
Copy link
Member

Fix #2895

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

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

Just for my curiosity, what's the difference between option.collectonly and getoption("collect-only")?

@codecov
Copy link

codecov bot commented Feb 6, 2019

Codecov Report

Merging #4725 into master will decrease coverage by 0.01%.
The diff coverage is 55.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4725      +/-   ##
==========================================
- Coverage   95.68%   95.66%   -0.02%     
==========================================
  Files         113      113              
  Lines       24963    24963              
  Branches     2478     2479       +1     
==========================================
- Hits        23886    23882       -4     
  Misses        762      762              
- Partials      315      319       +4
Flag Coverage Δ
#docs 29.67% <0%> (+0.07%) ⬆️
#doctesting 29.67% <0%> (+0.07%) ⬆️
#linting 29.67% <0%> (+0.07%) ⬆️
#linux 95.5% <55.55%> (-0.01%) ⬇️
#nobyte 92.28% <55.55%> (-0.01%) ⬇️
#numpy 93.1% <55.55%> (-0.01%) ⬇️
#pexpect 42.11% <55.55%> (ø) ⬆️
#py27 93.69% <55.55%> (+0.01%) ⬆️
#py34 91.77% <55.55%> (+0.06%) ⬆️
#py35 91.77% <55.55%> (+0.06%) ⬆️
#py36 91.79% <55.55%> (+0.06%) ⬆️
#py37 93.8% <55.55%> (-0.01%) ⬇️
#trial 93.1% <55.55%> (-0.01%) ⬇️
#windows 93.86% <55.55%> (-0.01%) ⬇️
#xdist 93.71% <55.55%> (-0.01%) ⬇️
Impacted Files Coverage Δ
testing/test_terminal.py 99.81% <100%> (ø) ⬆️
src/_pytest/terminal.py 91.73% <33.33%> (+0.15%) ⬆️
src/_pytest/cacheprovider.py 95.75% <0%> (-1.42%) ⬇️
src/_pytest/capture.py 93.66% <0%> (-0.46%) ⬇️

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 c780d1f...426d6e0. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Feb 6, 2019

Codecov Report

Merging #4725 into master will decrease coverage by 0.01%.
The diff coverage is 55.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4725      +/-   ##
==========================================
- Coverage   95.68%   95.66%   -0.02%     
==========================================
  Files         113      113              
  Lines       24963    24963              
  Branches     2478     2479       +1     
==========================================
- Hits        23886    23882       -4     
  Misses        762      762              
- Partials      315      319       +4
Flag Coverage Δ
#docs 29.67% <0%> (+0.07%) ⬆️
#doctesting 29.67% <0%> (+0.07%) ⬆️
#linting 29.67% <0%> (+0.07%) ⬆️
#linux 95.5% <55.55%> (-0.01%) ⬇️
#nobyte 92.28% <55.55%> (-0.01%) ⬇️
#numpy 93.1% <55.55%> (-0.01%) ⬇️
#pexpect 42.11% <55.55%> (ø) ⬆️
#py27 93.69% <55.55%> (+0.01%) ⬆️
#py34 91.77% <55.55%> (+0.06%) ⬆️
#py35 91.77% <55.55%> (+0.06%) ⬆️
#py36 91.79% <55.55%> (+0.06%) ⬆️
#py37 93.8% <55.55%> (-0.01%) ⬇️
#trial 93.1% <55.55%> (-0.01%) ⬇️
#windows 93.86% <55.55%> (-0.01%) ⬇️
#xdist 93.71% <55.55%> (-0.01%) ⬇️
Impacted Files Coverage Δ
testing/test_terminal.py 99.81% <100%> (ø) ⬆️
src/_pytest/terminal.py 91.73% <33.33%> (+0.15%) ⬆️
src/_pytest/cacheprovider.py 95.75% <0%> (-1.42%) ⬇️
src/_pytest/capture.py 93.66% <0%> (-0.46%) ⬇️

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 c780d1f...426d6e0. Read the comment docs.

@nicoddemus
Copy link
Member Author

Just for my curiosity, what's the difference between option.collectonly and getoption("collect-only")?

None, except the former is not really recommended anymore, not sure what's the specific reason for it.

@Zac-HD Zac-HD merged commit 3384ffc into pytest-dev:master Feb 6, 2019
@nicoddemus nicoddemus deleted the collection-finish branch February 6, 2019 22:52
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.

4 participants