File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ tracker = "https://github.com/spacetelescope/stpipe/issues"
46
46
[project .entry-points ."asdf .resource_mappings" ]
47
47
stpipe = " stpipe.integration:get_resource_mappings"
48
48
49
+ [project .entry-points .pytest11 ]
50
+ report_crds_context = " crds.pytest_crds.plugin"
51
+
49
52
[project .scripts ]
50
53
stpipe = " stpipe.cli.main:main"
51
54
strun = " stpipe.cli.strun:main"
Original file line number Diff line number Diff line change
1
+ def pytest_addoption (parser ):
2
+ parser .addoption (
3
+ "--report-crds-context" ,
4
+ action = "store_true" ,
5
+ help = "Report CRDS context in test suite header" ,
6
+ )
7
+
8
+
9
+ def pytest_report_header (config ):
10
+ """Add CRDS_CONTEXT to pytest report header"""
11
+
12
+ if config .getoption ("report_crds_context" ):
13
+ from stpipe .crds_client import get_context_used
14
+
15
+ return f"crds_context: { get_context_used ('jwst' )} "
16
+ else :
17
+ return []
You can’t perform that action at this time.
0 commit comments