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 stepwise crash when first collected module fails #5446

Merged
merged 4 commits into from
Jun 16, 2019

Conversation

graingert
Copy link
Member

@graingert graingert commented Jun 13, 2019

Fix #5444

@graingert
Copy link
Member Author

#5444

@nicoddemus nicoddemus requested review from nicoddemus and removed request for nicoddemus June 13, 2019 19:44
@nicoddemus nicoddemus self-assigned this Jun 13, 2019
@codecov
Copy link

codecov bot commented Jun 13, 2019

Codecov Report

Merging #5446 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5446      +/-   ##
==========================================
+ Coverage   95.96%   95.98%   +0.02%     
==========================================
  Files         114      114              
  Lines       25502    25502              
  Branches     2479     2479              
==========================================
+ Hits        24473    24479       +6     
+ Misses        723      717       -6     
  Partials      306      306
Impacted Files Coverage Δ
src/_pytest/stepwise.py 96.55% <100%> (-0.12%) ⬇️
testing/test_stepwise.py 100% <100%> (ø) ⬆️
src/_pytest/doctest.py 95.43% <0%> (+2.28%) ⬆️

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 e3dcf1f...c94e9b6. Read the comment docs.

@nicoddemus
Copy link
Member

Thanks for providing a failing test @graingert!

I implemented and pushed a fix. 👍

@nicoddemus
Copy link
Member

(We really should initialize all variables during __init__...)

Since then pytest itself adopted the behavior of interrupting
the test session on collection errors, so --sw no longer needs
to handle this.

The --sw behavior seems have been implemented when pytest
would continue execution even if there were collection errors.
@nicoddemus nicoddemus changed the title add test for stepwise attribute error Refs: #5444 Fix stepwise crash when first collected module fails Jun 13, 2019
@nicoddemus nicoddemus added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Jun 13, 2019
@@ -69,12 +70,6 @@ def pytest_collection_modifyitems(self, session, config, items):

config.hook.pytest_deselected(items=already_passed)

def pytest_collectreport(self, report):
Copy link
Member

Choose a reason for hiding this comment

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

No longer needed as described in bc345ac.

@nicoddemus nicoddemus merged commit b38a4e8 into pytest-dev:master Jun 16, 2019
@graingert graingert deleted the fix-stepwise-attribute-error branch June 16, 2019 13:58
@asottile
Copy link
Member

did this one get backported? hard to tell 🤔

@asottile asottile mentioned this pull request Oct 13, 2019
@nicoddemus
Copy link
Member

It was in 4b104ba

@nicoddemus nicoddemus removed the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Oct 13, 2019
@asottile
Copy link
Member

sweet

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.

StepwisePlugin instance has no attribute 'report_status'
3 participants