diff --git a/news/2 Fixes/6417.md b/news/2 Fixes/6417.md new file mode 100644 index 000000000000..c0bbed103301 --- /dev/null +++ b/news/2 Fixes/6417.md @@ -0,0 +1 @@ +Fix overwriting of cwd in the path list when discovering tests. diff --git a/pythonFiles/testing_tools/run_adapter.py b/pythonFiles/testing_tools/run_adapter.py index d21f3efd1b70..04a8cdae4c9b 100644 --- a/pythonFiles/testing_tools/run_adapter.py +++ b/pythonFiles/testing_tools/run_adapter.py @@ -4,9 +4,11 @@ # Replace the "." entry. import os.path import sys -sys.path[0] = os.path.dirname( - os.path.dirname( - os.path.abspath(__file__))) + +sys.path.insert(1, + os.path.dirname( + os.path.dirname( + os.path.abspath(__file__)))) from testing_tools.adapter.__main__ import parse_args, main