aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_base_parser.py
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-01-26 17:07:15 -0600
committerEugene Triguba <eugenetriguba@gmail.com>2020-01-26 17:07:15 -0600
commit09058bfcbaf07b7c45a8c9d5745bd60d54ce6353 (patch)
tree6fd1040521a96af952bf2648a9433529a80563be /tests/test_base_parser.py
parentRemove running codecov twice in CI (diff)
downloadconfig-file-09058bfcbaf07b7c45a8c9d5745bd60d54ce6353.zip
Test base parse function
Diffstat (limited to 'tests/test_base_parser.py')
-rw-r--r--tests/test_base_parser.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_base_parser.py b/tests/test_base_parser.py
index 3cd6e8a..64be16e 100644
--- a/tests/test_base_parser.py
+++ b/tests/test_base_parser.py
@@ -22,7 +22,10 @@ class ConcreteParser(BaseParser):
def stringify(self) -> str:
super().stringify()
- def parse(self, file_contents: str):
+ def parse(self, file_contents: str, call_super=False):
+ if call_super:
+ super().parse(file_contents)
+
return file_contents
@@ -39,6 +42,7 @@ def test_that_base_parser_can_not_be_instantiated():
(ConcreteParser("").delete, ""),
(ConcreteParser("").stringify, None),
(ConcreteParser("").has, ""),
+ (ConcreteParser("").parse, "call super"),
],
)
def test_that_base_parser_raises_not_implemented_errors(function, args):
@@ -47,5 +51,7 @@ def test_that_base_parser_raises_not_implemented_errors(function, args):
function()
elif type(args) is tuple:
function(*args)
+ elif args == "call super":
+ function(args, call_super=True)
else:
function(args)