Unverified Commit 5614cd56 authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman 💥
Browse files

Build: bytecode test working.

parent 0ef105be
......@@ -53,14 +53,10 @@ class TestTraversal:
assert 2 == len(bytecode.step_instructions[2])
##
bytecode = g.V(('a',[1,2,3])).out(('b','created')).where(__.in_(('c','created'),('d','knows')).count().is_(('e',P.gt(2)))).bytecode
assert 5 == len(bytecode.bindings.keys())
assert [1,2,3] == bytecode.bindings['a']
assert 'created' == bytecode.bindings['b']
assert 'created' == bytecode.bindings['c']
assert 'knows' == bytecode.bindings['d']
assert P.gt(2) == bytecode.bindings['e']
assert Binding('b','created') == bytecode.step_instructions[1][1]
assert 'binding[b=created]' == str(bytecode.step_instructions[1][1])
assert 'V' == bytecode.step_instructions[0][0]
assert 'out' == bytecode.step_instructions[1][0]
assert 'where' == bytecode.step_instructions[2][0]
assert ('b', 'created') == bytecode.step_instructions[1][1]
assert isinstance(hash(bytecode.step_instructions[1][1]),int)
def test_P(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment