Files
cbb-refresh-verify-795/tests/conftest.py
T

11 lines
376 B
Python

"""Keep subprocess imports on the worktree being tested."""
import os
from pathlib import Path
def pytest_configure():
source = str(Path(__file__).resolve().parents[1] / 'src')
existing = os.environ.get('PYTHONPATH', '').split(os.pathsep)
os.environ['PYTHONPATH'] = os.pathsep.join(
[source, *(entry for entry in existing if entry and entry != source)])