-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add documentation for primer and convert to command line option #5387
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
Changes from 1 commit
17faa0d
7a346a9
eda34a0
a40e4d2
dab1e03
86b2d00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -56,3 +56,39 @@ def disable(): | |||||
@pytest.fixture(scope="module") | ||||||
def reporter(): | ||||||
return MinimalTestReporter | ||||||
|
||||||
|
||||||
def pytest_addoption(parser) -> None: | ||||||
parser.addoption( | ||||||
"--primer_stdlib", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can't mark with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For CLI option I think the standard is |
||||||
action="store_true", | ||||||
default=False, | ||||||
help="Run primer stdlib tests", | ||||||
) | ||||||
parser.addoption( | ||||||
"--primer_external", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There's a lot of other place to change, but it's hard to do in github. |
||||||
action="store_true", | ||||||
default=False, | ||||||
help="Run primer external tests", | ||||||
) | ||||||
|
||||||
|
||||||
def pytest_collection_modifyitems(config, items) -> None: | ||||||
"""Convert command line options to markers""" | ||||||
# Add skip_primer_stdlib mark | ||||||
if not config.getoption("--primer_external"): | ||||||
skip_primer_external = pytest.mark.skip( | ||||||
reason="need --primer_external option to run" | ||||||
) | ||||||
for item in items: | ||||||
if "primer_external" in item.keywords: | ||||||
item.add_marker(skip_primer_external) | ||||||
|
||||||
# Add skip_primer_stdlib mark | ||||||
if not config.getoption("--primer_stdlib"): | ||||||
skip_primer_stdlib = pytest.mark.skip( | ||||||
reason="need --primer_stdlib option to run" | ||||||
) | ||||||
for item in items: | ||||||
if "primer_stdlib" in item.keywords: | ||||||
item.add_marker(skip_primer_stdlib) |
Uh oh!
There was an error while loading. Please reload this page.