Sha256: c5e72723d76dd46a42389b949257b2760697bf51501e16f3ae4d6967a2b5dcc1

Contents?: true

Size: 1.2 KB

Versions: 7

Compression:

Stored size: 1.2 KB

Contents

from openc3.script.suite import Group, Suite

load_utility("INST2/procedures/utilities/clear.py")


class ExampleGroup(Group):
    def setup(self):
        print("Setup")

    def script_run_method_with_long_name(self):
        print(
            f"Running {Group.current_suite()}:{Group.current_group()}:{Group.current_script()}"
        )
        Group.print("This test verifies requirement 1")
        raise RuntimeError("error")
        print("continue past raise")  # NOSONAR

    def script_2(self):
        print(
            f"Running {Group.current_suite()}:{Group.current_group()}:{Group.current_script()}"
        )
        Group.print("This test verifies requirement 2")
        self.helper()
        wait(2)

    def script_3(self):
        print(
            f"Running {Group.current_suite()}:{Group.current_group()}:{Group.current_script()}"
        )
        raise SkipScript

    def helper(self):
        if RunningScript.manual:
            answer = ask("Are you sure?")
        else:
            answer = "y"

    def teardown(self):
        print("teardown")


class MySuite(Suite):
    def __init__(self):
        super().__init__()
        self.add_group(ExampleGroup)


print("Running")
MySuite().run()

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
openc3-cosmos-demo-5.20.0 targets/INST2/procedures/my_script_suite.py
openc3-cosmos-demo-5.19.0 targets/INST2/procedures/my_script_suite.py
openc3-cosmos-demo-5.18.0 targets/INST2/procedures/my_script_suite.py
openc3-cosmos-demo-5.17.1 targets/INST2/procedures/my_script_suite.py
openc3-cosmos-demo-5.17.0 targets/INST2/procedures/my_script_suite.py
openc3-cosmos-demo-5.16.0 targets/INST2/procedures/my_script_suite.py
openc3-cosmos-demo-5.15.2 targets/INST2/procedures/my_script_suite.py