-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new launcher apio.py, for developers
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!venv/bin/python | ||
"""Run apio for debugging""" | ||
# ------------------------------------------------ | ||
# -- Run apio for debugging | ||
# -- It is not part of apio (it is not installed). | ||
# -- It is just a launcher for the developers | ||
#------------------------------------------------- | ||
|
||
import sys | ||
|
||
# -- Import the apio entry point | ||
from apio.__main__ import cli as apio | ||
|
||
from click.testing import CliRunner | ||
|
||
# -- Read the arguments | ||
cmds = sys.argv[1:] | ||
|
||
#-- Execute "apio cmds" | ||
result = CliRunner().invoke(apio, cmds) | ||
|
||
#-- Print the command output on the console | ||
print(result.output) |