diff --git a/requirements-testing.txt b/requirements-testing.txt index 7d0f6623..9821a776 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -1,6 +1,6 @@ coverage[toml] == 7.* coverage-conditional-plugin == 0.9.0 -pytest == 7.4.* +pytest == 8.3.* pytest-cov == 6.1.* pytest-timeout == 2.4.* pytest-xdist == 3.6.* diff --git a/test/openjd/adaptor_runtime/integ/background/test_background_mode.py b/test/openjd/adaptor_runtime/integ/background/test_background_mode.py index 5357f482..1fdc16ca 100644 --- a/test/openjd/adaptor_runtime/integ/background/test_background_mode.py +++ b/test/openjd/adaptor_runtime/integ/background/test_background_mode.py @@ -29,10 +29,15 @@ mod_path = (Path(__file__).parent.parent).resolve() sys.path.append(str(mod_path)) + if (_pypath := os.environ.get("PYTHONPATH")) is not None: os.environ["PYTHONPATH"] = os.pathsep.join((_pypath, str(mod_path))) else: os.environ["PYTHONPATH"] = str(mod_path) + +# Add the module path to PYTHONPATH for subprocesses +os.environ["PYTEST_XDIST_WORKER_PYTHONPATH"] = str(mod_path) + from AdaptorExample import AdaptorExample # noqa: E402 diff --git a/test/openjd/adaptor_runtime/integ/test_integration_entrypoint.py b/test/openjd/adaptor_runtime/integ/test_integration_entrypoint.py index 0218c7e4..22b0d5e3 100644 --- a/test/openjd/adaptor_runtime/integ/test_integration_entrypoint.py +++ b/test/openjd/adaptor_runtime/integ/test_integration_entrypoint.py @@ -20,10 +20,15 @@ mod_path = Path(__file__).parent.resolve() sys.path.append(str(mod_path)) + if (_pypath := os.environ.get("PYTHONPATH")) is not None: - os.environ["PYTHONPATH"] = ":".join((_pypath, str(mod_path))) + os.environ["PYTHONPATH"] = os.pathsep.join([_pypath, str(mod_path)]) else: os.environ["PYTHONPATH"] = str(mod_path) + +# Add the module path to PYTHONPATH for subprocesses +os.environ["PYTEST_XDIST_WORKER_PYTHONPATH"] = str(mod_path) + from CommandAdaptorExample import CommandAdaptorExample # noqa: E402