diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2020-08-05 21:38:37 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2020-08-05 21:38:37 -0500 |
| commit | 4baf3f13f6bd1a4a21b249969b3b311948568cbb (patch) | |
| tree | 351dd0dd73e9a415a650fd73deae3417171a537d | |
| parent | Fix `get_existent_keys` test with a IniParser check (diff) | |
| download | config-file-4baf3f13f6bd1a4a21b249969b3b311948568cbb.zip | |
Add docstrings to AbstractParser tests
| -rw-r--r-- | tests/test_abstract_parser.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_abstract_parser.py b/tests/test_abstract_parser.py index 890b173..a2d9dbe 100644 --- a/tests/test_abstract_parser.py +++ b/tests/test_abstract_parser.py @@ -4,6 +4,12 @@ from config_file.abstract_parser import AbstractParser class ConcreteParser(AbstractParser): + """ + ConcreteParser is a concrete implementation of the + AbstractParser that just calls the AbstractParser's + methods so we can ensure they raise a NotImplementedError. + """ + def __init__(self, file_contents): super().__init__(file_contents) @@ -27,6 +33,12 @@ class ConcreteParser(AbstractParser): def test_that_abstract_parser_can_not_be_instantiated(): + """ + config_file.abstract_parser.abstract_parser + + Ensure the AbstractParser raises a TypeError when it is + instantiated. + """ with pytest.raises(TypeError): AbstractParser("") @@ -43,6 +55,12 @@ def test_that_abstract_parser_can_not_be_instantiated(): ], ) def test_that_abstract_parser_raises_not_implemented_errors(function, args): + """ + config_file.abstract_parser.abstract_parser + + Ensure the AbstractParser raises a NotImplementedError + for every method in it. + """ with pytest.raises(NotImplementedError): if args is None: function() |