Skip to content

Commit

Permalink
tasks.py: fix PYTHONPATH for atest task
Browse files Browse the repository at this point in the history
Apparently, on RF4 and RF3 robot's `--pythonpath` does not like having
already-combined paths. Thus, give them separately.
  • Loading branch information
Tattoo committed Oct 31, 2023
1 parent b70b386 commit 3a47454
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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 '
Expand All @@ -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 '
Expand Down

0 comments on commit 3a47454

Please sign in to comment.