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

Build: bytecode test working.

parent 0ef105be
Pipeline #181 passed with stages
in 1 minute and 55 seconds
...@@ -53,14 +53,10 @@ class TestTraversal: ...@@ -53,14 +53,10 @@ class TestTraversal:
assert 2 == len(bytecode.step_instructions[2]) 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 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 'V' == bytecode.step_instructions[0][0]
assert [1,2,3] == bytecode.bindings['a'] assert 'out' == bytecode.step_instructions[1][0]
assert 'created' == bytecode.bindings['b'] assert 'where' == bytecode.step_instructions[2][0]
assert 'created' == bytecode.bindings['c'] assert ('b', 'created') == bytecode.step_instructions[1][1]
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 isinstance(hash(bytecode.step_instructions[1][1]),int) assert isinstance(hash(bytecode.step_instructions[1][1]),int)
def test_P(self): 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