@@ -62,7 +62,7 @@ class FindTestCasesVisitor(AsyncVisitor):
62
62
async def get (self , source : DocumentUri , model : ast .AST , base_name : Optional [str ]) -> List [TestItem ]:
63
63
self ._results : List [TestItem ] = []
64
64
self .source = source
65
- self .path = Uri (source ).to_path ()
65
+ self .path = Uri (source ).to_path (). resolve ()
66
66
self .base_name = base_name
67
67
await self .visit (model )
68
68
return self ._results
@@ -265,7 +265,8 @@ def generate(suite: TestSuite) -> TestItem:
265
265
children .append (
266
266
TestItem (
267
267
type = "test" ,
268
- id = f"{ test .source if test .source is not None else '' } ;" f"{ test .longname } ;{ test .lineno } " ,
268
+ id = f"{ Path (test .source ).resolve () if test .source is not None else '' } ;"
269
+ f"{ test .longname } ;{ test .lineno } " ,
269
270
label = test .name ,
270
271
longname = test .longname ,
271
272
uri = str (Uri .from_path (test .source )) if test .source else None ,
@@ -282,7 +283,7 @@ def generate(suite: TestSuite) -> TestItem:
282
283
283
284
return TestItem (
284
285
type = "suite" ,
285
- id = f"{ suite .source if suite .source is not None else '' } ;{ suite .longname } " ,
286
+ id = f"{ Path ( suite .source ). resolve () if suite .source is not None else '' } ;{ suite .longname } " ,
286
287
label = suite .name ,
287
288
longname = suite .longname ,
288
289
uri = str (Uri .from_path (suite .source )) if suite .source else None ,
@@ -348,7 +349,7 @@ def nonexisting_paths(paths: List[str]) -> Iterator[str]:
348
349
return [
349
350
TestItem (
350
351
type = "workspace" ,
351
- id = str (Path .cwd ()),
352
+ id = str (Path .cwd (). resolve () ),
352
353
label = Path .cwd ().name ,
353
354
longname = Path .cwd ().name ,
354
355
uri = str (Uri .from_path (Path .cwd ())),
@@ -381,7 +382,7 @@ def nonexisting_paths(paths: List[str]) -> Iterator[str]:
381
382
return [
382
383
TestItem (
383
384
type = "error" ,
384
- id = str (Uri .from_path (Path .cwd ())),
385
+ id = str (Uri .from_path (Path .cwd (). resolve () )),
385
386
longname = "error" ,
386
387
label = Path .cwd ().name ,
387
388
error = str (e ),
0 commit comments