Add an initial stab at docstrings - enable docstring pylinter

This commit is contained in:
Pim van Pelt
2022-04-24 10:36:25 +00:00
parent 544f343da7
commit 5af27211f3
25 changed files with 304 additions and 17 deletions

View File

@ -13,6 +13,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" This is a unit test suite for vppcfg """
import sys
import glob
@ -36,6 +37,8 @@ def example_validator(_yaml):
class YAMLTest(unittest.TestCase):
"""This test suite takes a YAML configuration file and holds it against the syntax
(Yamale) and semantic validators, returning errors in case of validation failures."""
def __init__(self, testName, yaml_filename, yaml_schema):
# calling the super class init varies for different python versions. This works for 2.7
super().__init__(testName)
@ -43,6 +46,7 @@ class YAMLTest(unittest.TestCase):
self.yaml_schema = yaml_schema
def test_yaml(self):
""" The test executor """
test = None
cfg = None
ncount = 0
@ -103,6 +107,7 @@ class YAMLTest(unittest.TestCase):
if __name__ == "__main__":
""" The main program """
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument(
"-t",