Skip to content

config: fix consider_preparse with missing argument to -p #4966

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
Mar 21, 2019

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Mar 21, 2019

This is only required after/with 415899d - otherwise argparse ensures
there is an argument already.

@@ -313,6 +313,8 @@ def test_preparse_args(self, pytestpm):
assert '"hello123"' in excinfo.value.args[0]
pytestpm.consider_preparse(["-pno:hello123"])

pytestpm.consider_preparse(["-p"])
Copy link
Member

Choose a reason for hiding this comment

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

I suggest to add a comment in the lines "just make sure single -p doesn't blow up"

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

LGTM apart from CHANGELOG

This is only required after/with 415899d - otherwise argparse ensures
there is an argument already.
@codecov
Copy link

codecov bot commented Mar 21, 2019

Codecov Report

Merging #4966 into features will increase coverage by 27.5%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##           features    #4966      +/-   ##
============================================
+ Coverage     68.38%   95.89%   +27.5%     
============================================
  Files            58      113      +55     
  Lines         12163    25319   +13156     
  Branches       1994     2496     +502     
============================================
+ Hits           8318    24280   +15962     
+ Misses         3251      729    -2522     
+ Partials        594      310     -284
Impacted Files Coverage Δ
src/_pytest/config/__init__.py 93.92% <100%> (+25.71%) ⬆️
testing/test_pluginmanager.py 100% <100%> (ø)
testing/test_warnings.py 98.9% <0%> (ø)
testing/test_pastebin.py 100% <0%> (ø)
testing/test_stepwise.py 100% <0%> (ø)
testing/test_argcomplete.py 68.11% <0%> (ø)
testing/python/setup_plan.py 100% <0%> (ø)
testing/test_helpconfig.py 97.29% <0%> (ø)
testing/logging/test_fixture.py 100% <0%> (ø)
testing/test_cacheprovider.py 99.72% <0%> (ø)
... and 96 more

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 0e6cf0f...ea2c6b8. Read the comment docs.

@blueyed blueyed dismissed nicoddemus’s stale review March 21, 2019 16:06

I think a changelog is not required - it was not used without argparse in a release yet.

@nicoddemus
Copy link
Member

I think a changelog is not required - it was not used without argparse in a release yet.

Oh good point. 👍

@blueyed blueyed merged commit 15d6088 into pytest-dev:features Mar 21, 2019
@blueyed blueyed deleted the fix-preparse branch March 21, 2019 18:13
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.

2 participants