Browse Source

Added test to ensure parser doesn't melt on regular data

master
Raphael Roberts 5 years ago
parent
commit
2ad6cf8831
  1. 11
      tests/test_parser_on_data.py

11
tests/test_parser_on_data.py

@ -1,5 +1,5 @@
import pytest
from pathlib import Path
from tibi_hardlinks.backup_parser import parse_property_text
@ -16,3 +16,12 @@ def test_canned_data(filename, canned_data_input, canned_data_output):
experimental = parse_property_text(data)
for key, value in expected_output.items():
assert experimental[key] == value
@pytest.mark.parametrize(
"property_filepath", Path("../test_data/mock_backup_data").glob("*.properties")
)
def test_parser_no_errors(property_filepath):
with open(property_filepath) as property_file:
data = property_file.read()
parse_property_text(data)
Loading…
Cancel
Save