Skip to content

Commit e61784f

Browse files
committed
When testing, always put the src dir before .packages in PYTHONPATH. We
don't want a dependency to install something that may have the same name as something in psij (including possibly a different version of psij itself) and hijack things.
1 parent 811e93b commit e61784f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/ci_runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ def run_branch_tests(conf: Dict[str, str], dir: Path, run_id: str, clone: bool =
164164

165165
cwd = (dir / 'code') if clone else Path('.')
166166
env = dict(os.environ)
167-
env['PYTHONPATH'] = str(cwd.resolve() / '.packages') \
168-
+ ':' + str(cwd.resolve() / 'src') \
167+
env['PYTHONPATH'] = str(cwd.resolve() / 'src') \
168+
+ ':' + str(cwd.resolve() / '.packages') \
169169
+ (':' + env['PYTHONPATH'] if 'PYTHONPATH' in env else '')
170170
subprocess.run(args, cwd=cwd.resolve(), env=env)
171171

0 commit comments

Comments
 (0)