1
1
import os
2
+ from pathlib import Path
2
3
3
4
# from types import NoneType
4
5
from setup_tests import (
5
- run_request ,
6
- write_rpc_request ,
7
- write_rpc_notification ,
8
6
path_to_uri ,
7
+ run_request ,
9
8
test_dir ,
9
+ write_rpc_notification ,
10
+ write_rpc_request ,
10
11
)
11
12
12
13
@@ -658,7 +659,7 @@ def check_return(results, ref_results):
658
659
)
659
660
errcode , results = run_request (string )
660
661
assert errcode == 0
661
- file_path = os . path . join (test_dir , "diag" , "test_external.f90" )
662
+ root = Path (test_dir )
662
663
ref_results = [
663
664
[],
664
665
[],
@@ -675,7 +676,7 @@ def check_return(results, ref_results):
675
676
"relatedInformation" : [
676
677
{
677
678
"location" : {
678
- "uri" : f"file://{ file_path } " ,
679
+ "uri" : f"file://{ root / 'diag' / 'test_external.f90' } " ,
679
680
"range" : {
680
681
"start" : {"line" : 5 , "character" : 0 },
681
682
"end" : {"line" : 5 , "character" : 0 },
@@ -695,7 +696,7 @@ def check_return(results, ref_results):
695
696
"relatedInformation" : [
696
697
{
697
698
"location" : {
698
- "uri" : f"file://{ file_path } " ,
699
+ "uri" : f"file://{ root / 'diag' / 'test_external.f90' } " ,
699
700
"range" : {
700
701
"start" : {"line" : 3 , "character" : 0 },
701
702
"end" : {"line" : 3 , "character" : 0 },
0 commit comments