You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by fl...@apache.org on 2018/05/19 09:28:25 UTC

[05/50] tinkerpop git commit: Added Pop.all to python gherkin test support

Added Pop.all to python gherkin test support

Pop.all in python is Pop.all_ in python - needed that translation for tests that use that expression CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8462f857
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8462f857
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8462f857

Branch: refs/heads/TINKERPOP-1897
Commit: 8462f857d78a11e4d383fdc077fe8bb8688cbe67
Parents: c155818
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Apr 24 09:17:18 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Apr 24 09:17:18 2018 -0400

----------------------------------------------------------------------
 gremlin-python/src/main/jython/radish/feature_steps.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8462f857/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index 5cf9059..80137b0 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -25,6 +25,7 @@ from gremlin_python.process.traversal import Barrier, Cardinality, P, Pop, Scope
 from radish import given, when, then
 from hamcrest import *
 
+regex_all = re.compile(r"Pop\.all")
 regex_and = re.compile(r"([(.,\s])and\(")
 regex_as = re.compile(r"([(.,\s])as\(")
 regex_from = re.compile(r"([(.,\s])from\(")
@@ -233,6 +234,7 @@ def _table_assertion(data, result, ctx, ordered):
 
 def _translate(traversal):
     replaced = traversal.replace("\n", "")
+    replaced = regex_all.sub(r"Pop.all_", replaced)
     replaced = regex_and.sub(r"\1and_(", replaced)
     replaced = regex_from.sub(r"\1from_(", replaced)
     replaced = regex_global.sub(r"\1global_", replaced)