Skip to content

Commit 3a47454

Browse files
committedOct 31, 2023
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.
1 parent b70b386 commit 3a47454

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎tasks.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
CURDIR = Path.cwd()
1212
SRCPATH = CURDIR / 'src'
1313
UNIT_TESTS = CURDIR / 'tests'
14+
DUMMYHANDLERS = UNIT_TESTS / 'resources' / 'my_dummy_handlers'
1415

1516
# If you want colored output for the tasks, use `run()` with `pty=True`
1617
# Not on Windows, though -- it'll fail if you have `pty=True`
@@ -61,7 +62,7 @@ def _setup_atest():
6162
tags: oxygen-metadata''')
6263
return (tempconf,
6364
os.pathsep.join([str(SRCPATH),
64-
str(UNIT_TESTS / 'resources' / 'my_dummy_handlers')]))
65+
str(DUMMYHANDLERS)]))
6566

6667
@task(help={
6768
'rf': 'Additional command-line arguments for Robot Framework as '
@@ -73,7 +74,8 @@ def atest(context, rf=''):
7374
env={'PYTHONPATH': pythonpath})
7475
try:
7576
run(f'robot '
76-
f'--pythonpath {pythonpath} '
77+
f'--pythonpath {str(SRCPATH)} '
78+
f'--pythonpath {str(DUMMYHANDLERS)} '
7779
f'--dotted '
7880
f'{rf} '
7981
f'--listener oxygen.listener '

0 commit comments

Comments
 (0)