-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix: fixed issue with provinces and prov_no_coast
- Loading branch information
Showing
5 changed files
with
50 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from daidepp.daide_visitor import daide_visitor | ||
from daidepp.grammar import create_daide_grammar | ||
from daidepp.node_visitor import daide_visitor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import pytest | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def sample_daide_messages(): | ||
return [ | ||
"PRP(XDO((ENG FLT EDI) SUP (ENG AMY LVP) MTO CLY))", | ||
"PRP(XDO((ENG FLT (STP SCS)) SUP (ENG AMY LVP) MTO CLY))", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from typing import List | ||
|
||
|
||
def test_basic_visitor(sample_daide_messages: List[str]): | ||
from daidepp.daide_visitor import daide_visitor | ||
from daidepp.grammar import create_daide_grammar | ||
|
||
grammar = create_daide_grammar(level=130) | ||
for message in sample_daide_messages: | ||
tree = grammar.parse(message) | ||
daide_visitor.visit(tree) | ||
assert True |