Option C oc_diagnostics
Loading...
Searching...
No Matches
instrumentation_selftest.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
# oc_diagnostics/instrumentation_selftest.py
4
5
"""
6
Unified Instrumentation Self-Test
7
=================================
8
9
Runs both:
10
- CLI instrumentation tests
11
- Optional Dash app instrumentation test
12
13
Usage:
14
python -m oc_diagnostics.instrumentation_selftest
15
"""
16
17
import
argparse
18
19
# These modules will exist in the new package structure
20
from
oc_diagnostics.instrumentation_selftest_cli
import
main
as
cli_main
21
from
oc_diagnostics.instrumentation_selftest_app
import
main
as
app_main
22
23
24
def
main
():
25
"""
26
Entry point for the unified instrumentation self-test suite.
27
28
Parameters
29
----------
30
None
31
32
Behavior
33
--------
34
- Always runs CLI tests
35
- Optionally launches the Dash test app when --app is provided
36
"""
37
parser = argparse.ArgumentParser(description=
"Instrumentation Self-Test"
)
38
parser.add_argument(
39
"--app"
,
40
action=
"store_true"
,
41
help=
"Launch the Dash test app after CLI tests"
,
42
)
43
args = parser.parse_args()
44
45
cli_main()
46
47
if
args.app:
48
app_main()
49
50
51
if
__name__ ==
"__main__"
:
52
main
()
oc_diagnostics.instrumentation_selftest_app
Definition
instrumentation_selftest_app.py:1
oc_diagnostics.instrumentation_selftest_cli
Definition
instrumentation_selftest_cli.py:1
oc_diagnostics.instrumentation_selftest.main
main()
Definition
instrumentation_selftest.py:24
oc_diagnostics
instrumentation_selftest.py
Generated by
1.15.0