Skip to content

Commit

Permalink
modify tests/test_parse.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sayat-a committed Jul 30, 2024
1 parent 61df027 commit 1784fdf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_parse.py
Original file line number Diff line number Diff line change
@@ -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():
Expand Down

0 comments on commit 1784fdf

Please sign in to comment.