def test_suite():
"""Discover all tests in the tests dir"""
test_loader = unittest.TestLoader()
# Read in unit tests
test_suite = test_loader.discover('tests')
# Doctest all md and rst files
for root, dirs, files in os.walk("."):
for f in files:
if f.endswith(".rst") or f.endswith(".md"):
test_suite.addTests(
doctest.DocFileSuite(os.path.join(root, f),
optionflags=doctest.ELLIPSIS))
return test_suite
评论列表
文章目录