You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
725 B
23 lines
725 B
import pytest
|
|
|
|
from tibi_hardlinks.backup_parser import parse_property_text
|
|
|
|
# random_data fixture
|
|
# sample data fixture
|
|
|
|
|
|
@pytest.mark.usefixtures("canned_data_input", "canned_data_output")
|
|
@pytest.mark.parametrize("filename", [("example-new"), ("example-old")])
|
|
def test_canned_data(filename, canned_data_input, canned_data_output):
|
|
data = canned_data_input(filename)
|
|
expected_output = canned_data_output(filename)
|
|
|
|
experimental = parse_property_text(data)
|
|
for key, value in expected_output.items():
|
|
assert experimental[key] == value
|
|
|
|
|
|
def test_parser_no_errors(property_filepath):
|
|
with open(property_filepath) as property_file:
|
|
data = property_file.read()
|
|
parse_property_text(data)
|