Skip to content

Commit

Permalink
Add missing tests for SyntaxError
Browse files Browse the repository at this point in the history
  • Loading branch information
rogalski committed Oct 4, 2021
1 parent 163efeb commit 041f406
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/darker/tests/test_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def test_ast_verifier_is_equivalent():
assert not verifier.is_equivalent_to_baseline(
TextDocument.from_lines(["if False: pass"])
)
assert not verifier.is_equivalent_to_baseline(
TextDocument.from_lines(["if False:"])
)


def test_ast_verifier_assert_equivalent():
Expand All @@ -54,6 +57,8 @@ def test_ast_verifier_assert_equivalent():
verifier.assert_equivalent_to_baseline(
TextDocument.from_lines(["if False: pass"])
)
with pytest.raises(NotEquivalentError):
verifier.assert_equivalent_to_baseline(TextDocument.from_lines(["if False:"]))


def test_binary_search_premature_result():
Expand Down

0 comments on commit 041f406

Please sign in to comment.