Created
April 26, 2018 15:41
-
-
Save pipermerriam/bf3a360b896f75be39b363495821a8aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[31m[1m________________________________ test_trie_sync ________________________________[0m | |
[1m @given(random=strategies.randoms())[0m | |
[1m> @settings(max_examples=10)[0m | |
[1m def test_trie_sync(random):[0m | |
f = <function given.<locals>.run_test_with_generator.<locals>.wrapped_test at 0x00007fea84b0d6a0> | |
[1m[31mtests/test_sync.py[0m:18: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
[1m[31m.tox/pypy3-rlp1/site-packages/hypothesis/core.py[0m:525: in wrapped_test | |
[1m print_example=True, is_final=True[0m | |
[1m[31m.tox/pypy3-rlp1/site-packages/hypothesis/executors.py[0m:58: in default_new_style_executor | |
[1m return function(data)[0m | |
[1m[31m.tox/pypy3-rlp1/site-packages/hypothesis/core.py[0m:112: in run | |
[1m return test(*args, **kwargs)[0m | |
[1m[31mtests/test_sync.py[0m:29: in test_trie_sync | |
[1m scheduler.process(results)[0m | |
[1m[31mtrie/sync.py[0m:180: in process | |
[1m references, leaves = self.get_children(request)[0m | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <trie.sync.HexaryTrieSync object at 0x00007fea7f461d38> | |
request = SyncRequest(0xf92ca2f82692a47ed4891445b4524f06847783e85a7a11b84364cbb76e0dc199, depth=2) | |
[1m def get_children(self, request):[0m | |
[1m """Return all children of the node retrieved by the given request.[0m | |
[1m [0m | |
[1m :rtype: A two-tuple with one list containing the children that reference other nodes and[0m | |
[1m another containing the leaf children.[0m | |
[1m """[0m | |
[1m node = decode_node(request.data)[0m | |
[1m node_type = get_node_type(node)[0m | |
[1m references = [][0m | |
[1m leaves = [][0m | |
[1m if node_type == NODE_TYPE_LEAF:[0m | |
[1m leaves.append(node[1])[0m | |
[1m elif node_type == NODE_TYPE_EXTENSION:[0m | |
[1m depth = request.depth + len(node[0])[0m | |
[1m references.append((depth, node[1]))[0m | |
[1m elif node_type == NODE_TYPE_BRANCH:[0m | |
[1m depth = request.depth + 1[0m | |
[1m for item in node[:16]:[0m | |
[1m if is_blank_node(item):[0m | |
[1m continue[0m | |
[1m [0m | |
[1m # In a branch, the first 16 items are either a node whose RLP-encoded[0m | |
[1m # representation is under 32 bytes or a reference to another node.[0m | |
[1m if len(item) == 2:[0m | |
[1m if get_node_type(item) != NODE_TYPE_LEAF:[0m | |
[1m> raise UnexpectedNodeType("Expected a node of type leaf, but got %s" % item)[0m | |
[1m[31mE trie.exceptions.UnexpectedNodeType: Expected a node of type leaf, but got [b'\x1a', [b'', b'', b'', b'', b'', b'', b'', b'', b'', [b':f\x95', b'\x04\x9f'], b'', b'', b'', b'', b'', b'', b'F\xbe']][0m | |
depth = 3 | |
item = [b'\x1a', [b'', b'', b'', b'', b'', b'', ...]] | |
leaves = [] | |
node = [b'', b"?\xd3\x16\x87\x1a\xa4oiy\xdcc\x0f\x95u\xdb\xd4OrF\xe0\xd0\n^#\x85\x8b\x9b\x19'\xdd\xc4j", b'\xa4\xde[\xa0\xef\xbc\xc4\xd7\xa7\xc5\x02\xf4,\xd2\xf0\xb8el\x9f\xd9Z+\xa8\xd44{O}\xdcQE\x95', b'', b'', b'', ...] | |
node_type = 3 | |
references = [(3, b"?\xd3\x16\x87\x1a\xa4oiy\xdcc\x0f\x95u\xdb\xd4OrF\xe0\xd0\n^#\x85\x8b\x9b\x19'\xdd\xc4j"), (3, b'\xa4\xde[\xa0\...2\xc4\x84O\xc1'), (3, b'\xcf\xfa\x94,W\xe1\xb6\x07\x11\xd4\xd3\x12\xc2Ay\x8d\x8e\xdd\x0e{5\x08hk\x8a0\x18\xf18T\xf2x')] | |
request = SyncRequest(0xf92ca2f82692a47ed4891445b4524f06847783e85a7a11b84364cbb76e0dc199, depth=2) | |
self = <trie.sync.HexaryTrieSync object at 0x00007fea7f461d38> | |
[1m[31mtrie/sync.py[0m:141: UnexpectedNodeType | |
---------------------------------- Hypothesis ---------------------------------- | |
Falsifying example: test_trie_sync(random=RandomWithSeed(37968)) | |
[31m[1m==================== 1 failed, 887 passed in 36.20 seconds =====================[0m | |
[31mERROR: InvocationError for command '/home/travis/build/ethereum/py-trie/.tox/pypy3-rlp1/bin/py.test tests' (exited with code 1)[0m | |
___________________________________ summary ____________________________________ | |
[31mERROR: pypy3-rlp1: commands failed[0m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment