From 3a47454d21affaa6ec0837dfc9dae9321c323675 Mon Sep 17 00:00:00 2001 From: Tattoo Date: Tue, 31 Oct 2023 12:34:20 +0200 Subject: [PATCH] tasks.py: fix PYTHONPATH for atest task Apparently, on RF4 and RF3 robot's `--pythonpath` does not like having already-combined paths. Thus, give them separately. --- tasks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks.py b/tasks.py index 15d6beb..71e3d51 100644 --- a/tasks.py +++ b/tasks.py @@ -11,6 +11,7 @@ CURDIR = Path.cwd() SRCPATH = CURDIR / 'src' UNIT_TESTS = CURDIR / 'tests' +DUMMYHANDLERS = UNIT_TESTS / 'resources' / 'my_dummy_handlers' # If you want colored output for the tasks, use `run()` with `pty=True` # Not on Windows, though -- it'll fail if you have `pty=True` @@ -61,7 +62,7 @@ def _setup_atest(): tags: oxygen-metadata''') return (tempconf, os.pathsep.join([str(SRCPATH), - str(UNIT_TESTS / 'resources' / 'my_dummy_handlers')])) + str(DUMMYHANDLERS)])) @task(help={ 'rf': 'Additional command-line arguments for Robot Framework as ' @@ -73,7 +74,8 @@ def atest(context, rf=''): env={'PYTHONPATH': pythonpath}) try: run(f'robot ' - f'--pythonpath {pythonpath} ' + f'--pythonpath {str(SRCPATH)} ' + f'--pythonpath {str(DUMMYHANDLERS)} ' f'--dotted ' f'{rf} ' f'--listener oxygen.listener '