--- a/src/pyams_utils/tests/test_utilsdocs.py Wed Nov 27 16:46:35 2019 +0100
+++ b/src/pyams_utils/tests/test_utilsdocs.py Tue Jun 23 12:53:06 2020 +0200
@@ -14,23 +14,23 @@
##############################################################################
"""
-Generic Test case for ztfy.utils doctest
+Generic test case for pyams_utils doctests
"""
-__docformat__ = 'restructuredtext'
-
import doctest
import os
import unittest
from pyams_utils.tests import get_package_dir
+__docformat__ = 'restructuredtext'
+
CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
def doc_suite(test_dir, setUp=None, tearDown=None, globs=None): # pylint: disable=invalid-name
- """Returns a test suite, based on doctests found in /doctest."""
+ """Returns a test suite, based on doctests found in /doctests"""
suite = []
if globs is None:
globs = globals()
@@ -43,7 +43,7 @@
# filtering files on extension
docs = [os.path.join(doctest_dir, doc) for doc in
- os.listdir(doctest_dir) if doc.endswith('.txt')]
+ os.listdir(doctest_dir) if doc.endswith('.txt') or doc.endswith('.rst')]
for test in docs:
suite.append(doctest.DocFileSuite(test, optionflags=flags,