Skip to content

Commit e4700b3

Browse files
committed
Require script-root arg for python -m testutils.
Having a required script-root argument makes the tool easier to use, as it no longer defaults to a tests dir. See also issue #68.
1 parent 905a63d commit e4700b3

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

azure/worker/testutils.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -524,17 +524,14 @@ def start_webhost(*, script_dir=None, stdout=None):
524524

525525
def _main():
526526
parser = argparse.ArgumentParser(description='Run a Python worker.')
527-
parser.add_argument(
528-
'--script-root',
529-
dest='script_root',
530-
default=FUNCS_PATH,
531-
help=f'defaults to {FUNCS_PATH}')
527+
parser.add_argument('scriptroot',
528+
help='directory with functions to load')
532529

533530
args = parser.parse_args()
534531

535532
host = popen_webhost(
536533
stdout=sys.stdout, stderr=sys.stderr,
537-
script_root=os.path.abspath(args.script_root))
534+
script_root=os.path.abspath(args.scriptroot))
538535
try:
539536
host.wait()
540537
finally:

0 commit comments

Comments
 (0)