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

Pass more flags to pytest #560

Closed
BlinkyStitt opened this issue May 27, 2020 · 2 comments · Fixed by #773
Closed

Pass more flags to pytest #560

BlinkyStitt opened this issue May 27, 2020 · 2 comments · Fixed by #773
Labels
cli Relating to the Brownie command-line interface enhancement New feature or request

Comments

@BlinkyStitt
Copy link
Collaborator

Overview

I have some tests marked xfail and I noticed that they started passing.

I tried to get more info about these like the pytest docs say to, but brownie doesn't pass these flags through.

Specification

Rather than add a bunch of flags to brownie, I think there could be a "--" flag and everything after that just gets passed to pytest.

brownie test --  -rxXs
@iamdefinitelyahuman
Copy link
Member

A big part of the reason Brownie offers a limited subset of pytest flags is because of the amount of voodoo happening to allow things like with isolation and coverage. The test surface is exponentially larger when you add in all the extra flags, almost definitely something will end up breaking. Forcing the user to type python -m pytest in my mind is akin to an acknowledgement of "I'm doing something that might not be supported".

That said, I'm not inherently opposed to this change. Perhaps raising a warning with it's use that "here be (maybe) dragons" - this would be even more explicit than the current approach.

@iamdefinitelyahuman iamdefinitelyahuman added cli Relating to the Brownie command-line interface enhancement New feature or request labels May 27, 2020
@iamdefinitelyahuman
Copy link
Member

Related - it should be possible to pass multiple test filenames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Relating to the Brownie command-line interface enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants