@@ -62,7 +62,7 @@ class FindTestCasesVisitor(AsyncVisitor):
6262 async def get (self , source : DocumentUri , model : ast .AST , base_name : Optional [str ]) -> List [TestItem ]:
6363 self ._results : List [TestItem ] = []
6464 self .source = source
65- self .path = Uri (source ).to_path ()
65+ self .path = Uri (source ).to_path (). resolve ()
6666 self .base_name = base_name
6767 await self .visit (model )
6868 return self ._results
@@ -256,7 +256,8 @@ def generate(suite: TestSuite) -> TestItem:
256256 children .append (
257257 TestItem (
258258 type = "test" ,
259- id = f"{ Path (test .source ) if test .source is not None else '' } ;" f"{ test .longname } ;{ test .lineno } " ,
259+ id = f"{ Path (test .source ).resolve () if test .source is not None else '' } ;"
260+ f"{ test .longname } ;{ test .lineno } " ,
260261 label = test .name ,
261262 longname = test .longname ,
262263 uri = str (Uri .from_path (test .source )) if test .source else None ,
@@ -273,7 +274,7 @@ def generate(suite: TestSuite) -> TestItem:
273274
274275 return TestItem (
275276 type = "suite" ,
276- id = f"{ Path (suite .source ) if suite .source is not None else '' } ;{ suite .longname } " ,
277+ id = f"{ Path (suite .source ). resolve () if suite .source is not None else '' } ;{ suite .longname } " ,
277278 label = suite .name ,
278279 longname = suite .longname ,
279280 uri = str (Uri .from_path (suite .source )) if suite .source else None ,
@@ -339,7 +340,7 @@ def nonexisting_paths(paths: List[str]) -> Iterator[str]:
339340 return [
340341 TestItem (
341342 type = "workspace" ,
342- id = str (Path .cwd ()),
343+ id = str (Path .cwd (). resolve () ),
343344 label = Path .cwd ().name ,
344345 longname = Path .cwd ().name ,
345346 uri = str (Uri .from_path (Path .cwd ())),
@@ -372,7 +373,7 @@ def nonexisting_paths(paths: List[str]) -> Iterator[str]:
372373 return [
373374 TestItem (
374375 type = "error" ,
375- id = str (Uri .from_path (Path .cwd ())),
376+ id = str (Uri .from_path (Path .cwd (). resolve () )),
376377 longname = "error" ,
377378 label = Path .cwd ().name ,
378379 error = str (e ),
0 commit comments