-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc174e4
commit 543f59b
Showing
3 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
def pytest_addoption(parser): | ||
parser.addoption( | ||
"--report-crds-context", | ||
action="store_true", | ||
help="Report CRDS context in test suite header", | ||
) | ||
|
||
|
||
def pytest_report_header(config): | ||
"""Add CRDS_CONTEXT to pytest report header""" | ||
|
||
if config.getoption("report_crds_context"): | ||
from stpipe.crds_client import get_context_used | ||
|
||
return f"crds_context: {get_context_used('jwst')}" | ||
else: | ||
return [] |