Skip to content

Commit 303571a

Browse files
committed
Improves test case paths
1 parent 2af2b48 commit 303571a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/test_server.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import os
2+
from pathlib import Path
23

34
# from types import NoneType
45
from setup_tests import (
5-
run_request,
6-
write_rpc_request,
7-
write_rpc_notification,
86
path_to_uri,
7+
run_request,
98
test_dir,
9+
write_rpc_notification,
10+
write_rpc_request,
1011
)
1112

1213

@@ -658,7 +659,7 @@ def check_return(results, ref_results):
658659
)
659660
errcode, results = run_request(string)
660661
assert errcode == 0
661-
file_path = os.path.join(test_dir, "diag", "test_external.f90")
662+
root = Path(test_dir)
662663
ref_results = [
663664
[],
664665
[],
@@ -675,7 +676,7 @@ def check_return(results, ref_results):
675676
"relatedInformation": [
676677
{
677678
"location": {
678-
"uri": f"file://{file_path}",
679+
"uri": f"file://{root/'diag'/'test_external.f90'}",
679680
"range": {
680681
"start": {"line": 5, "character": 0},
681682
"end": {"line": 5, "character": 0},
@@ -695,7 +696,7 @@ def check_return(results, ref_results):
695696
"relatedInformation": [
696697
{
697698
"location": {
698-
"uri": f"file://{file_path}",
699+
"uri": f"file://{root/'diag'/'test_external.f90'}",
699700
"range": {
700701
"start": {"line": 3, "character": 0},
701702
"end": {"line": 3, "character": 0},

0 commit comments

Comments
 (0)