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"""
6Unified Instrumentation Self-Test
7=================================
8
9Runs both:
10- CLI instrumentation tests
11- Optional Dash app instrumentation test
12
13Usage:
14 python -m oc_diagnostics.instrumentation_selftest
15"""
16
17import argparse
18
19# These modules will exist in the new package structure
20from oc_diagnostics.instrumentation_selftest_cli import main as cli_main
21from oc_diagnostics.instrumentation_selftest_app import main as app_main
22
23
24def 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
51if __name__ == "__main__":
52 main()