Skip to content

Commit

Permalink
Adapted tests to enum error levels
Browse files Browse the repository at this point in the history
  • Loading branch information
HenningTimm committed Dec 19, 2023
1 parent 025d719 commit 247a406
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit_tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from yml2block.__main__ import guess_input_type
from yml2block.rules import Level


def test_input_guessing_valid_tsv():
Expand Down Expand Up @@ -48,7 +49,7 @@ def test_input_guessing_valid_csv():
for path in valid_csv_paths:
guessed_type, violations = guess_input_type(path)
assert len(violations) == 1
assert violations[0].level == "WARNING"
assert violations[0].level == Level.WARNING
assert guessed_type == "csv"


Expand Down Expand Up @@ -114,5 +115,5 @@ def test_input_guessing_invalid_extension():
for path in invalid_extension_paths:
guessed_type, violations = guess_input_type(path)
assert len(violations) == 1
assert violations[0].level == "ERROR"
assert violations[0].level == Level.ERROR
assert guessed_type == False

0 comments on commit 247a406

Please sign in to comment.