Skip to content

Commit

Permalink
Fix style issues with doctest tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Jun 18, 2020
1 parent e0ae69d commit 7b60a3b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_docstrings.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Test examples in code docstrings using doctest."""
import doctest
import pkgutil
import unittest
Expand All @@ -6,11 +7,12 @@


def load_tests(loader, tests, ignore):
modules = pkgutil.walk_packages(rowan.__path__, rowan.__name__ + '.')
"""Create tests from all docstrings by walking the package hierarchy."""
modules = pkgutil.walk_packages(rowan.__path__, rowan.__name__ + ".")
for _, module_name, _ in modules:
tests.addTests(doctest.DocTestSuite(module_name, globs={'rowan': rowan}))
tests.addTests(doctest.DocTestSuite(module_name, globs={"rowan": rowan}))
return tests


if __name__ == '__main__':
if __name__ == "__main__":
unittest.main()

0 comments on commit 7b60a3b

Please sign in to comment.