Skip to content

Commit

Permalink
Add tighter assertion per review, fix formatting
Browse files Browse the repository at this point in the history
---
Signed-off-by: Michael Ferguson <[email protected]>
  • Loading branch information
mppf committed Jul 8, 2024
1 parent d194e52 commit 31f0c00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/chpl-language-server/test/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ async def test_incorrect_cross_file_diagnostics(client: LanguageClient):
async with source_files(client, A=fileA, B=fileB) as docs:
await save_file(client, docs("B"), docs("A"))
assert len(client.diagnostics[docs("A").uri]) == 0
assert len(client.diagnostics[docs("B").uri]) >= 1
assert len(client.diagnostics[docs("B").uri]) == 2

# check if the expected warnings are present
foundImplicitModule = False
foundSameName = False
for d in client.diagnostics[docs("B").uri]:
if 'ImplicitFileModule' in d.message:
if "ImplicitFileModule" in d.message:
# Warning: [ImplicitFileModule]: an implicit module named 'B'
# is being introduced to contain file-scope code
foundImplicitModule = True
if 'ImplicitModuleSameName' in d.message:
if "ImplicitModuleSameName" in d.message:
# Warning: [ImplicitModuleSameName]: module 'B' has
# the same name as the implicit file module
foundSameName = True
Expand Down

0 comments on commit 31f0c00

Please sign in to comment.