From 1b2d6aff6ccf72fdb292a1f05bb41bf9633a8f55 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Tue, 25 Apr 2023 04:03:48 -0600 Subject: refactor tests and add more typing --- tests/test_yaml_parser.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/test_yaml_parser.py') diff --git a/tests/test_yaml_parser.py b/tests/test_yaml_parser.py index 906c7e6..0d8df96 100644 --- a/tests/test_yaml_parser.py +++ b/tests/test_yaml_parser.py @@ -5,19 +5,19 @@ from pyssg.yaml_parser import get_parsed_yaml # and test the join functionality -def test_yaml_resource_read(simple_yaml: str, test_resource: str) -> None: - yaml: list[dict[str, Any]] = get_parsed_yaml(simple_yaml, test_resource) +def test_yaml_resource_read(default_yaml: str, config_resource: str) -> None: + yaml: list[dict[str, Any]] = get_parsed_yaml(default_yaml, config_resource) assert len(yaml) == 1 -def test_yaml_path_read(test_dir: str) -> None: - yaml_path: str = f'{test_dir}/io_files/simple.yaml' +def test_yaml_path_read(sample_files_path: str, default_yaml: str) -> None: + yaml_path: str = f'{sample_files_path}/config/{default_yaml}' yaml: list[dict[str, Any]] = get_parsed_yaml(yaml_path) assert len(yaml) == 1 -def test_yaml_join(simple_yaml: str, test_resource: str) -> None: - yaml: dict[str, Any] = get_parsed_yaml(simple_yaml, test_resource)[0] +def test_yaml_join(default_yaml: str, config_resource: str) -> None: + yaml: dict[str, Any] = get_parsed_yaml(default_yaml, config_resource)[0] define_str: str = '$PYSSG_HOME/pyssg/site_example/' assert yaml['define'] == define_str assert yaml['path']['src'] == f'{define_str}src' -- cgit v1.2.3-54-g00ecf