Skip to content

Commit ed7ed7a

Browse files
committed
fix: load test_runners before typer is invoked
1 parent 6d87510 commit ed7ed7a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

launchable/__main__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
from .utils import logger
1616
from .version import __version__
1717

18+
# Load all test runners at module level so they register their commands
19+
for f in glob(join(dirname(__file__), 'test_runners', "*.py")):
20+
f = basename(f)[:-3]
21+
if f == '__init__':
22+
continue
23+
importlib.import_module('launchable.test_runners.%s' % f)
24+
1825
app = typer.Typer()
1926

2027

@@ -60,13 +67,6 @@ def main(
6067

6168
logging.basicConfig(level=level)
6269

63-
# load all test runners
64-
for f in glob(join(dirname(__file__), 'test_runners', "*.py")):
65-
f = basename(f)[:-3]
66-
if f == '__init__':
67-
continue
68-
importlib.import_module('launchable.test_runners.%s' % f)
69-
7070
# load all plugins
7171
if plugin_dir:
7272
for f in glob(join(plugin_dir, '*.py')):

0 commit comments

Comments
 (0)