From b6c8126589a94c2986c591ad7741cd3787a96e58 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Wed, 12 Dec 2018 17:47:25 -0800 Subject: Move zero_ex.json_schemas to its own package --- python-packages/json_schemas/test/test_doctest.py | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 python-packages/json_schemas/test/test_doctest.py (limited to 'python-packages/json_schemas/test/test_doctest.py') diff --git a/python-packages/json_schemas/test/test_doctest.py b/python-packages/json_schemas/test/test_doctest.py new file mode 100644 index 000000000..2aa576422 --- /dev/null +++ b/python-packages/json_schemas/test/test_doctest.py @@ -0,0 +1,25 @@ +"""Exercise doctests for all of our modules.""" + +from doctest import testmod +import pkgutil +import importlib + +import zero_ex.json_schemas + + +def test_all_doctests(): + """Gather zero_ex.json_schemas.* modules and doctest them.""" + # json_schemas module + module = "zero_ex.json_schemas" + print(module) + failure_count, _ = testmod(importlib.import_module(module)) + assert failure_count == 0 + + # any json_schemas.* sub-modules + for (_, modname, _) in pkgutil.walk_packages( + path=zero_ex.json_schemas.__path__, prefix="zero_ex.json_schemas" + ): + module = importlib.import_module(modname) + print(module) + (failure_count, _) = testmod(module) + assert failure_count == 0 -- cgit