diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-10 18:51:13 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-10 18:56:15 +0800 |
commit | cee29542451d3bf8c99bd08963a2108768072195 (patch) | |
tree | f3d657be53459ce3851fcf9632bd94f32ee80184 /python-packages/order_utils/test | |
parent | a8d9263062e586b90ee4c303d3d3aca72e428edc (diff) | |
parent | 686f27a96f0cd749f6315d7edd2bb56cf1819245 (diff) | |
download | dexon-0x-contracts-cee29542451d3bf8c99bd08963a2108768072195.tar dexon-0x-contracts-cee29542451d3bf8c99bd08963a2108768072195.tar.gz dexon-0x-contracts-cee29542451d3bf8c99bd08963a2108768072195.tar.bz2 dexon-0x-contracts-cee29542451d3bf8c99bd08963a2108768072195.tar.lz dexon-0x-contracts-cee29542451d3bf8c99bd08963a2108768072195.tar.xz dexon-0x-contracts-cee29542451d3bf8c99bd08963a2108768072195.tar.zst dexon-0x-contracts-cee29542451d3bf8c99bd08963a2108768072195.zip |
Merge development
Diffstat (limited to 'python-packages/order_utils/test')
3 files changed, 3 insertions, 42 deletions
diff --git a/python-packages/order_utils/test/test_doctest.py b/python-packages/order_utils/test/test_doctest.py deleted file mode 100644 index 297f75e75..000000000 --- a/python-packages/order_utils/test/test_doctest.py +++ /dev/null @@ -1,18 +0,0 @@ -"""Exercise doctests for all of our modules.""" - -from doctest import testmod -import pkgutil -import importlib - -import zero_ex - - -def test_all_doctests(): - """Gather zero_ex.* modules and doctest them.""" - for (_, modname, _) in pkgutil.walk_packages( - path=zero_ex.__path__, prefix="zero_ex." - ): - module = importlib.import_module(modname) - print(module) - (failure_count, _) = testmod(module) - assert failure_count == 0 diff --git a/python-packages/order_utils/test/test_generate_order_hash_hex.py b/python-packages/order_utils/test/test_generate_order_hash_hex.py index 6869a40ed..38b503289 100644 --- a/python-packages/order_utils/test/test_generate_order_hash_hex.py +++ b/python-packages/order_utils/test/test_generate_order_hash_hex.py @@ -8,5 +8,7 @@ def test_get_order_hash_hex__empty_order(): expected_hash_hex = ( "faa49b35faeb9197e9c3ba7a52075e6dad19739549f153b77dfcf59408a4b422" ) - actual_hash_hex = generate_order_hash_hex(make_empty_order()) + actual_hash_hex = generate_order_hash_hex( + make_empty_order(), "0x0000000000000000000000000000000000000000" + ) assert actual_hash_hex == expected_hash_hex diff --git a/python-packages/order_utils/test/test_json_schemas.py b/python-packages/order_utils/test/test_json_schemas.py deleted file mode 100644 index 51cecbd4f..000000000 --- a/python-packages/order_utils/test/test_json_schemas.py +++ /dev/null @@ -1,23 +0,0 @@ -"""Tests of zero_ex.json_schemas""" - - -from zero_ex.order_utils import make_empty_order -from zero_ex.json_schemas import _LOCAL_RESOLVER, assert_valid - - -def test_assert_valid_caches_resources(): - """Test that the JSON ref resolver in `assert_valid()` caches resources - - In order to test the cache we much access the private class of - `json_schemas` and reset the LRU cache on `_LocalRefResolver`. - For this to happen, we need to disable errror `W0212` - on _LOCAL_RESOLVER - """ - _LOCAL_RESOLVER._remote_cache.cache_clear() # pylint: disable=W0212 - - assert_valid(make_empty_order(), "/orderSchema") - cache_info = ( - _LOCAL_RESOLVER._remote_cache.cache_info() # pylint: disable=W0212 - ) - assert cache_info.currsize == 4 - assert cache_info.hits == 10 |