Skip to content

Commit

Permalink
Update test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ogorodnik committed Dec 19, 2024
1 parent d4a063e commit 92e4a1f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions testsuite/ada_lsp/config_file/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
configurationFile configuration option and have proper navigation
"""

import e3
import subprocess
from drivers.pylsp import (
ALSLanguageClient,
Expand All @@ -19,13 +18,9 @@
Location,
)

if "windows" in e3.env.Env().build.platform:
runtime = "light"
else:
runtime = "sjlj"

# create default.cgpr configuration file that will use not-native runtime
subprocess.check_call(["gprconfig", "--batch", "--config=Ada,," + runtime + ",,GNAT"])
# create default.cgpr configuration file that will use not-default runtime
subprocess.check_call(["gprconfig", "--batch", "--config=Ada,,light,,GNAT"])


@test()
Expand All @@ -48,7 +43,7 @@ async def do_testing(lsp: ALSLanguageClient) -> None:
# Check result
assert result
assert isinstance(result, Location)
assertEqual(runtime in result.uri, True)
assertEqual("light" in result.uri, True)

# Check relative to root paths
lsp.didChangeConfig(
Expand All @@ -68,4 +63,4 @@ async def do_testing(lsp: ALSLanguageClient) -> None:
# Check result
assert result
assert isinstance(result, Location)
assertEqual(runtime in result.uri, True)
assertEqual("light" in result.uri, True)

0 comments on commit 92e4a1f

Please sign in to comment.