Skip to content

Commit

Permalink
Fix regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Senier committed Mar 9, 2021
1 parent 219cbbd commit 2f75fde
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Empty file added tests/regression/__init__.py
Empty file.
3 changes: 1 addition & 2 deletions tests/regression/regression_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pathlib import Path
from typing import Sequence

from rflx import expression as expr, model
from rflx.specification import parser
from tests.const import SPEC_DIR

Expand All @@ -10,7 +9,7 @@ def assert_create_valid_model(filenames: Sequence[str]) -> None:
p = parser.Parser()
for filename in filenames:
p.parse(Path(filename))
m = p.create_model()
p.create_model()


def test_dependency_order() -> None:
Expand Down
12 changes: 8 additions & 4 deletions tests/unit/specification/parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2428,8 +2428,10 @@ def test_parse_error_duplicate_spec_file_file() -> None:
p.parse(SPEC_DIR / "message_type.rflx")
with pytest.raises(
RecordFluxError,
match='^parser: error: duplicate specification "tests/data/specs/subdir/message_type.rflx"\n'
'parser: error: previous specification "tests/data/specs/message_type.rflx"$',
match=(
'^parser: error: duplicate specification "tests/data/specs/subdir/message_type.rflx"\n'
'parser: error: previous specification "tests/data/specs/message_type.rflx"$'
),
):
p.parse(SPEC_DIR / "subdir/message_type.rflx")

Expand All @@ -2449,7 +2451,9 @@ def test_parse_error_duplicate_spec_stdin_file() -> None:
)
with pytest.raises(
RecordFluxError,
match='^parser: error: duplicate specification "tests/data/specs/subdir/message_type.rflx"\n'
'parser: error: previous specification "<stdin>"$',
match=(
'^parser: error: duplicate specification "tests/data/specs/subdir/message_type.rflx"\n'
'parser: error: previous specification "<stdin>"$'
),
):
p.parse(SPEC_DIR / "subdir/message_type.rflx")

0 comments on commit 2f75fde

Please sign in to comment.