From 95b2898b9c0898c7e2d98ee603bff0604bf2a829 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Wed, 7 Nov 2018 11:20:46 -0500 Subject: [order_utils.py] is_signature_valid, via Exchange contract (#1216) First support for signature validation, done via Exchange contract's isValidSignature() method. --- python-packages/order_utils/test/test_doctest.py | 32 ++++++++++-------------- 1 file changed, 13 insertions(+), 19 deletions(-) (limited to 'python-packages/order_utils/test/test_doctest.py') diff --git a/python-packages/order_utils/test/test_doctest.py b/python-packages/order_utils/test/test_doctest.py index ba5da5418..2b0350ac0 100644 --- a/python-packages/order_utils/test/test_doctest.py +++ b/python-packages/order_utils/test/test_doctest.py @@ -1,24 +1,18 @@ -"""Exercise doctests for order_utils module.""" +"""Exercise doctests for all of our modules.""" from doctest import testmod +import pkgutil -from zero_ex.dev_utils import abi_utils, type_assertions -from zero_ex.order_utils import asset_data_utils +import zero_ex -def test_doctest_asset_data_utils(): - """Invoke doctest on the asset_data_utils module.""" - (failure_count, _) = testmod(asset_data_utils) - assert failure_count == 0 - - -def test_doctest_abi_utils(): - """Invoke doctest on the abi_utils module.""" - (failure_count, _) = testmod(abi_utils) - assert failure_count == 0 - - -def test_doctest_type_assertions(): - """Invoke doctest on the type_assertions module.""" - (failure_count, _) = testmod(type_assertions) - assert failure_count == 0 +def test_all_doctests(): + """Gather zero_ex.* modules and doctest them.""" + # prefer `black` formatting. pylint: disable=bad-continuation + for (importer, modname, _) in pkgutil.walk_packages( + path=zero_ex.__path__, prefix="zero_ex." + ): + module = importer.find_module(modname).load_module(modname) + print(module) + (failure_count, _) = testmod(module) + assert failure_count == 0 -- cgit v1.2.3