TINKERPOP-786 Minor change to imports for python DSL example
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/628ef6e0 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/628ef6e0 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/628ef6e0 Branch: refs/heads/tp32-glv Commit: 628ef6e02c59adc213335083324792ac2d571b0e Parents: 5e09caf Author: Stephen Mallette <[email protected]> Authored: Thu May 11 10:06:17 2017 -0400 Committer: Stephen Mallette <[email protected]> Committed: Tue May 16 11:02:31 2017 -0400 ---------------------------------------------------------------------- gremlin-python/src/main/jython/tests/process/test_dsl.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/628ef6e0/gremlin-python/src/main/jython/tests/process/test_dsl.py ---------------------------------------------------------------------- diff --git a/gremlin-python/src/main/jython/tests/process/test_dsl.py b/gremlin-python/src/main/jython/tests/process/test_dsl.py index 04313ab..0652cbb 100644 --- a/gremlin-python/src/main/jython/tests/process/test_dsl.py +++ b/gremlin-python/src/main/jython/tests/process/test_dsl.py @@ -20,7 +20,8 @@ import pytest from gremlin_python.process.traversal import (Bytecode, P) from gremlin_python.process.graph_traversal import ( - GraphTraversalSource, GraphTraversal, __) + GraphTraversalSource, GraphTraversal) +from gremlin_python.process.graph_traversal import __ as AnonymousTraversal from gremlin_python.structure.graph import Graph __author__ = 'David M. Brown ([email protected])' @@ -37,7 +38,7 @@ class SocialTraversal(GraphTraversal): def createdAtLeast(self, number): return self.outE("created").count().is_(P.gte(number)) -class ___(__): +class __(AnonymousTraversal): @staticmethod def knows(*args): return SocialTraversal(None, None, Bytecode()).knows(*args) @@ -74,4 +75,4 @@ def test_dsl(remote_connection): assert social.persons("marko").youngestFriendsAge().next() == 27 assert social.persons().count().next() == 4 assert social.persons("marko", "josh").count().next() == 2 - assert social.persons().filter(___.createdAtLeast(2)).count().next() == 1 + assert social.persons().filter(__.createdAtLeast(2)).count().next() == 1
