aboutsummaryrefslogtreecommitdiffstats
path: root/python-packages/order_utils/test/test_doctest.py
diff options
context:
space:
mode:
authorF. Eugene Aumson <feuGeneA@users.noreply.github.com>2018-11-08 00:20:46 +0800
committerGitHub <noreply@github.com>2018-11-08 00:20:46 +0800
commit95b2898b9c0898c7e2d98ee603bff0604bf2a829 (patch)
tree6ac589bc869b0e177b48e4a2ae545fc986b08cba /python-packages/order_utils/test/test_doctest.py
parent094f71066294d14bc1920e4d3ddf4e7705201d61 (diff)
downloaddexon-sol-tools-95b2898b9c0898c7e2d98ee603bff0604bf2a829.tar
dexon-sol-tools-95b2898b9c0898c7e2d98ee603bff0604bf2a829.tar.gz
dexon-sol-tools-95b2898b9c0898c7e2d98ee603bff0604bf2a829.tar.bz2
dexon-sol-tools-95b2898b9c0898c7e2d98ee603bff0604bf2a829.tar.lz
dexon-sol-tools-95b2898b9c0898c7e2d98ee603bff0604bf2a829.tar.xz
dexon-sol-tools-95b2898b9c0898c7e2d98ee603bff0604bf2a829.tar.zst
dexon-sol-tools-95b2898b9c0898c7e2d98ee603bff0604bf2a829.zip
[order_utils.py] is_signature_valid, via Exchange contract (#1216)
First support for signature validation, done via Exchange contract's isValidSignature() method.
Diffstat (limited to 'python-packages/order_utils/test/test_doctest.py')
-rw-r--r--python-packages/order_utils/test/test_doctest.py32
1 files changed, 13 insertions, 19 deletions
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