Skip to content

Commit 247a406

Browse files
committed
Adapted tests to enum error levels
1 parent 025d719 commit 247a406

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/unit_tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from yml2block.__main__ import guess_input_type
2+
from yml2block.rules import Level
23

34

45
def test_input_guessing_valid_tsv():
@@ -48,7 +49,7 @@ def test_input_guessing_valid_csv():
4849
for path in valid_csv_paths:
4950
guessed_type, violations = guess_input_type(path)
5051
assert len(violations) == 1
51-
assert violations[0].level == "WARNING"
52+
assert violations[0].level == Level.WARNING
5253
assert guessed_type == "csv"
5354

5455

@@ -114,5 +115,5 @@ def test_input_guessing_invalid_extension():
114115
for path in invalid_extension_paths:
115116
guessed_type, violations = guess_input_type(path)
116117
assert len(violations) == 1
117-
assert violations[0].level == "ERROR"
118+
assert violations[0].level == Level.ERROR
118119
assert guessed_type == False

0 commit comments

Comments
 (0)