From 461cb78f0a56b9293b5ade10fe90ec4aa77d23ad Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 19 Jul 2020 15:02:13 -0500 Subject: Change name of BaseParser to AbstractParser --- tests/test_config_file.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/test_config_file.py') diff --git a/tests/test_config_file.py b/tests/test_config_file.py index 899e644..5430fb8 100644 --- a/tests/test_config_file.py +++ b/tests/test_config_file.py @@ -4,14 +4,14 @@ from pathlib import Path import pytest from config_file.config_file import ConfigFile -from config_file.parsers import BaseParser +from config_file.parsers import AbstractParser SUPPORTED_FILE_TYPES = ["ini", "json"] @pytest.fixture(params=SUPPORTED_FILE_TYPES) def template_and_config_file(request, template_file): - def func(template_name: str = "default", parser: BaseParser = None): + def func(template_name: str = "default", parser: AbstractParser = None): template = template_file(request.param, template_name) return (template, ConfigFile(template, parser=parser)) @@ -20,7 +20,7 @@ def template_and_config_file(request, template_file): @pytest.fixture def templated_config_file(template_and_config_file): - def func(template_name: str = "default", parser: BaseParser = None): + def func(template_name: str = "default", parser: AbstractParser = None): return template_and_config_file(template_name, parser)[1] return func @@ -31,7 +31,7 @@ def test_that_config_file_is_initialized_correctly(template_and_config_file): assert config.path == template_file assert config.stringify() == template_file.read_text() - assert isinstance(config._ConfigFile__parser, BaseParser) + assert isinstance(config._ConfigFile__parser, AbstractParser) def test_that_a_tidle_in_the_config_path_expands_to_the_absolute_path(): @@ -180,7 +180,7 @@ def test_that_config_file_can_delete(templated_config_file): def test_that_custom_parser_can_be_used(template_and_config_file): - class CustomParser(BaseParser): + class CustomParser(AbstractParser): def __init__(self, file_contents): super().__init__(file_contents) -- cgit v1.2.3