Skip to content

Commit

Permalink
Allow suites to use import
Browse files Browse the repository at this point in the history
  • Loading branch information
jmthomas committed Dec 3, 2024
1 parent 2cda837 commit bd74760
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Helper:
def help(self):
def print_help(self):
print("help")
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from INST2.lib.helper import Helper

helper = Helper()
helper.help()
helper.print_help()

number = ask("Enter a number.")
if not isinstance(number, (int, float)):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from openc3.script.suite import Group, Suite

load_utility("INST2/procedures/utilities/clear.py")
# Load a target file library (not instrumented)
from INST2.lib.helper import Helper


class ExampleGroup(Group):
Expand Down Expand Up @@ -30,6 +32,8 @@ def script_3(self):
raise SkipScript

def helper(self):
helper = Helper()
helper.print_help()
if RunningScript.manual:
answer = ask("Are you sure?")
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ export default {
}
.list {
background-color: var(--color-background-surface-default) !important;
overflow-x: hidden;
}
.v-theme--cosmosDark.v-list div:nth-child(odd) .v-list-item {
background-color: var(--color-background-base-selected) !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from openc3.script.suite_runner import SuiteRunner
from openc3.utilities.target_file import TargetFile
from openc3.script import *
import openc3.utilities.target_file_importer

openc3_scope = sys.argv[1] # argv[0] is the script name
path = sys.argv[2]
Expand Down
2 changes: 1 addition & 1 deletion openc3/python/test/utilities/test_target_file_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ def test_import(self):
# from INST2.lib.helper import Helper

# helper = Helper()
# self.assertEqual(helper.help(), 42)
# self.assertEqual(helper.print_help(), 42)

0 comments on commit bd74760

Please sign in to comment.