Skip to content

Commit cac8024

Browse files
kimadelineDonJayamanne
authored andcommitted
Fix overwriting of cwd in test discovery path list (microsoft#6713)
* Fix overwriting of cwd in test discovery path list * cleaner formatting
1 parent 345a6ba commit cac8024

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

news/2 Fixes/6417.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix overwriting of cwd in the path list when discovering tests.

pythonFiles/testing_tools/run_adapter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
# Replace the "." entry.
55
import os.path
66
import sys
7-
sys.path[0] = os.path.dirname(
8-
os.path.dirname(
9-
os.path.abspath(__file__)))
7+
8+
sys.path.insert(1,
9+
os.path.dirname(
10+
os.path.dirname(
11+
os.path.abspath(__file__))))
1012

1113
from testing_tools.adapter.__main__ import parse_args, main
1214

0 commit comments

Comments
 (0)