diff --git a/tests/test_parse.py b/tests/test_parse.py index 2bebd0d..dfd1982 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -1,13 +1,15 @@ from gendiff.parse import load_file, define_extension import json import yaml +import pytest -def test_define_extension(): - file_path = 'tests/fixtures/file1.json' - file_path2 = 'tests/fixtures/plain_yml_file1.yaml' - assert define_extension(file_path) == '.json' - assert define_extension(file_path2) == '.yaml' +@pytest.mark.parametrize("file_path, expected_result", [ + ('tests/fixtures/file1.json', '.json'), + ('tests/fixtures/plain_yml_file1.yaml', '.yaml') +]) +def test_define_extension(file_path, expected_result): + assert define_extension(file_path) == expected_result def test_load_file():