src/pyams_utils/tests/test_utilsdocstrings.py
branchdev-tf
changeset 427 63284c98cdc1
parent 367 2c95d34496f5
child 435 4504a27af426
equal deleted inserted replaced
426:2022e4da3ad9 427:63284c98cdc1
    44     docs = [doc for doc in
    44     docs = [doc for doc in
    45             os.listdir(package_dir) if doc.endswith('.py')]
    45             os.listdir(package_dir) if doc.endswith('.py')]
    46     docs = [doc for doc in docs if not doc.startswith('__')]
    46     docs = [doc for doc in docs if not doc.startswith('__')]
    47 
    47 
    48     for test in docs:
    48     for test in docs:
    49         fd = open(os.path.join(package_dir, test))
    49         fd = open(os.path.join(package_dir, test))  # pylint: disable=invalid-name
    50         content = fd.read()
    50         content = fd.read()
    51         fd.close()
    51         fd.close()
    52         if '>>> ' not in content:
    52         if '>>> ' not in content:
    53             continue
    53             continue
    54         test = test.replace('.py', '')
    54         test = test.replace('.py', '')