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

Improve behavior of --numprocesses=auto and --pdb #415

Merged
merged 4 commits into from
Feb 15, 2019

Conversation

jirikuncar
Copy link
Member

I was getting annoyed by changing pytest -ff -n=auto ... command when I wanted to append only --pdb. With this PR one can use -n=auto and anytime simply append --pdb without getting the UsageError.

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, thanks @jirikuncar!

@jirikuncar
Copy link
Member Author

@nicoddemus is it necessary to fix the AppVeyor failures [1]?


[1] https://ci.appveyor.com/project/pytestbot/pytest-xdist/builds/22311072/job/tpjds44asi1uy5cj

@nicoddemus
Copy link
Member

Hi @jirikuncar,

Yeah, we need to fix it as it is part of our CI. I think this is due to recent changes on how UsageError is displayed (might be related to pytest-dev/pytest#4651 which was merged just a few hours before your build failed).

I think it is enough to change:

result.stdout.fnmatch_lines(
    ["usage: pytest.py *", "pytest.py: error: my_usage_error"]
)

to:

result.stdout.fnmatch_lines(
    ["*usage: pytest.py *", "pytest.py: error: my_usage_error"]
)

I will push a commit to that effect, let's see. 👍

@nicoddemus
Copy link
Member

Fixed linting, should be OK now. 👍

@nicoddemus nicoddemus merged commit bc44fea into pytest-dev:master Feb 15, 2019
@nicoddemus
Copy link
Member

Thanks a ton @jirikuncar for the PR!

@jirikuncar jirikuncar deleted the numprocesses-auto-with-pdb branch February 19, 2019 09:50
@blueyed
Copy link
Contributor

blueyed commented Mar 21, 2019

Nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants