tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [13/50] tinkerpop git commit: TINKERPOP-1784 Added multi-line support in the .feature files
Date Thu, 26 Oct 2017 17:15:05 GMT
TINKERPOP-1784 Added multi-line support in the .feature files


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

Branch: refs/heads/TINKERPOP-1784
Commit: 785efe09364919ab8c5cb3944019db8bec412876
Parents: 096e089
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Tue Oct 10 15:39:40 2017 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Thu Oct 26 13:14:36 2017 -0400

----------------------------------------------------------------------
 .../src/main/jython/radish/feature_steps.py     |  3 +-
 gremlin-test/features/branch/Branch.feature     | 19 +++++-
 gremlin-test/features/map/Count.feature         |  7 ++-
 gremlin-test/features/map/Select.feature        | 65 +++++++++++++++-----
 .../features/sideEffect/GroupCount.feature      | 33 ++++++++--
 5 files changed, 102 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/785efe09/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 3c25258..68eeeaf 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -144,6 +144,7 @@ def __table_assertion(data, result, ctx, ordered):
 
 
 def __translate(traversal):
-    replaced = regex_as.sub(r"\1as_(", traversal)
+    replaced = traversal.replace("\n", "")
+    replaced = regex_as.sub(r"\1as_(", replaced)
     replaced = regex_is.sub(r"\1is_(", replaced)
     return regex_in.sub(r"\1in_(", replaced)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/785efe09/gremlin-test/features/branch/Branch.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Branch.feature b/gremlin-test/features/branch/Branch.feature
index 93562c8..49864e0 100644
--- a/gremlin-test/features/branch/Branch.feature
+++ b/gremlin-test/features/branch/Branch.feature
@@ -22,7 +22,11 @@ Feature: Step - branch()
     And using the parameter l1 is "c[it.get().label() == 'person' ? 'a' : 'b']"
     And the traversal of
       """
-      g.V().branch(l1).option("a", __.values("age")).option("b", __.values("lang")).option("b",
__.values("name"))
+      g.V().
+        branch(l1).
+          option("a", __.values("age")).
+          option("b", __.values("lang")).
+          option("b", __.values("name"))
       """
     When iterated to list
     Then the result should be unordered
@@ -39,7 +43,11 @@ Feature: Step - branch()
     Given the modern graph
     And the traversal of
       """
-      g.V().branch(__.label().is("person").count()).option(1L, __.values("age")).option(0L,
__.values("lang")).option(0L, __.values("name"))
+      g.V().
+        branch(__.label().is("person").count()).
+          option(1L, __.values("age")).
+          option(0L, __.values("lang")).
+          option(0L, __.values("name"))
       """
     When iterated to list
     Then the result should be unordered
@@ -56,7 +64,12 @@ Feature: Step - branch()
     Given the modern graph
     And the traversal of
       """
-      g.V().branch(__.label().is("person").count()).option(1L, __.values("age")).option(0L,
__.values("lang")).option(0L, __.values("name")).option(Pick.any, __.label())
+      g.V().
+        branch(__.label().is("person").count()).
+          option(1L, __.values("age")).
+          option(0L, __.values("lang")).
+          option(0L, __.values("name")).
+          option(Pick.any, __.label())
       """
     When iterated to list
     Then the result should be unordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/785efe09/gremlin-test/features/map/Count.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Count.feature b/gremlin-test/features/map/Count.feature
index 6053605..7f708ee 100644
--- a/gremlin-test/features/map/Count.feature
+++ b/gremlin-test/features/map/Count.feature
@@ -94,7 +94,12 @@ Feature: Step - count()
     Given the grateful graph
     And the traversal of
       """
-      g.V().repeat(__.out()).times(5).as("a").out("writtenBy").as("b").select("a", "b").count()
+      g.V().
+        repeat(__.out()).
+          times(5).as("a").
+        out("writtenBy").as("b").
+        select("a", "b").
+        count()
       """
     When iterated to list
     Then the result should be ordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/785efe09/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index f29a436..74cd4ec 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -34,7 +34,8 @@ Feature: Step - select()
     And using the parameter v1Id is "v[marko].id"
     And the traversal of
       """
-      g.V(v1Id).as("a").out("knows").as("b").select("a", "b").by("name")
+      g.V(v1Id).as("a").out("knows").as("b").
+        select("a", "b").by("name")
       """
     When iterated to list
     Then the result should be unordered
@@ -58,7 +59,8 @@ Feature: Step - select()
     And using the parameter v1Id is "v[marko].id"
     And the traversal of
       """
-      g.V(v1Id).as("a").out("knows").as("b").select("a").by("name")
+      g.V(v1Id).as("a").out("knows").as("b").
+        select("a").by("name")
       """
     When iterated to list
     Then the result should be unordered
@@ -69,7 +71,8 @@ Feature: Step - select()
     Given the modern graph
     And the traversal of
       """
-      g.V().as("a").out().as("b").select("a", "b").by("name")
+      g.V().as("a").out().as("b").
+        select("a", "b").by("name")
       """
     When iterated to list
     Then the result should be unordered
@@ -84,7 +87,8 @@ Feature: Step - select()
     Given the modern graph
     And the traversal of
       """
-      g.V().as("a").out().aggregate("x").as("b").select("a", "b").by("name")
+      g.V().as("a").out().aggregate("x").as("b").
+        select("a", "b").by("name")
       """
     When iterated to list
     Then the result should be unordered
@@ -99,7 +103,11 @@ Feature: Step - select()
     Given the modern graph
     And the traversal of
       """
-      g.V().as("a").values("name").order().as("b").select("a", "b").by("name").by()
+      g.V().as("a").
+        values("name").
+        order().as("b").
+        select("a", "b").
+          by("name").by()
       """
     When iterated to list
     Then the result should be unordered
@@ -114,7 +122,13 @@ Feature: Step - select()
     Given the crew graph
     And the traversal of
       """
-      g.V().has("name", "gremlin").inE("uses").order().by("skill", Order.incr).as("a").outV().as("b").select("a",
"b").by("skill").by("name")
+      g.V().has("name", "gremlin").
+        inE("uses").
+        order().by("skill", Order.incr).as("a").
+        outV().as("b").
+        select("a", "b").
+          by("skill").
+          by("name")
       """
     When iterated to list
     Then the result should be unordered
@@ -147,7 +161,9 @@ Feature: Step - select()
     Given the modern graph
     And the traversal of
       """
-      g.V().hasLabel("person").as("p").map(__.bothE().label().groupCount()).as("r").select("p",
"r")
+      g.V().hasLabel("person").as("p").
+        map(__.bothE().label().groupCount()).as("r").
+        select("p", "r")
       """
     When iterated to list
     Then the result should be unordered
@@ -160,7 +176,12 @@ Feature: Step - select()
     Given the modern graph
     And the traversal of
       """
-      g.V().choose(__.outE().count().is(0L), __.as("a"), __.as("b")).choose(__.select("a"),
__.select("a"), __.select("b"))
+      g.V().choose(__.outE().count().is(0L),
+                   __.as("a"),
+                   __.as("b")).
+            choose(__.select("a"),
+                   __.select("a"),
+                   __.select("b"))
       """
     When iterated to list
     Then the result should be unordered
@@ -201,7 +222,9 @@ Feature: Step - select()
     And using the parameter v4Id is "v[josh].id"
     And the traversal of
       """
-      g.V(v4Id).out().as("here").has("lang", "java").select("here").values("name")
+      g.V(v4Id).out().as("here").
+        has("lang", "java").
+        select("here").values("name")
       """
     When iterated to list
     Then the result should be unordered
@@ -213,7 +236,9 @@ Feature: Step - select()
     And using the parameter v1Id is "v[marko].id"
     And the traversal of
       """
-      g.V(v1Id).outE().as("here").inV().has("name", "vadas").select("here")
+      g.V(v1Id).outE().as("here").
+        inV().has("name", "vadas").
+        select("here")
       """
     When iterated to list
     Then the result should be unordered
@@ -224,7 +249,10 @@ Feature: Step - select()
     And using the parameter v1Id is "v[marko].id"
     And the traversal of
       """
-      g.V(v1Id).outE("knows").has("weight", 1.0).as("here").inV().has("name", "josh").select("here")
+      g.V(v1Id).outE("knows").
+        has("weight", 1.0).as("here").
+        inV().has("name", "josh").
+        select("here")
       """
     When iterated to list
     Then the result should be unordered
@@ -235,7 +263,10 @@ Feature: Step - select()
     And using the parameter v1Id is "v[marko].id"
     And the traversal of
       """
-      g.V(v1Id).outE("knows").as("here").has("weight", 1.0).as("fake").inV().has("name",
"josh").select("here")
+      g.V(v1Id).outE("knows").as("here").
+        has("weight", 1.0).as("fake").
+        inV().has("name", "josh").
+        select("here")
       """
     When iterated to list
     Then the result should be unordered
@@ -245,7 +276,9 @@ Feature: Step - select()
     Given the modern graph
     And the traversal of
       """
-      g.V().as("here").out().values("name").select("here")
+      g.V().as("here").
+        out().values("name").
+        select("here")
       """
     When iterated to list
     Then the result should be unordered
@@ -260,7 +293,11 @@ Feature: Step - select()
     Given the modern graph
     And the traversal of
       """
-      g.V().out("created").union(__.as("project").in("created").has("name", "marko").select("project"),
__.as("project").in("created").in("knows").has("name", "marko").select("project")).groupCount().by("name")
+      g.V().out("created").
+        union(__.as("project").in("created").has("name", "marko").select("project"),
+              __.as("project").in("created").in("knows").has("name", "marko").select("project")).
+        groupCount().
+          by("name")
       """
     When iterated to list
     Then the result should be unordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/785efe09/gremlin-test/features/sideEffect/GroupCount.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/GroupCount.feature b/gremlin-test/features/sideEffect/GroupCount.feature
index 28eb675..35ac8d3 100644
--- a/gremlin-test/features/sideEffect/GroupCount.feature
+++ b/gremlin-test/features/sideEffect/GroupCount.feature
@@ -41,7 +41,10 @@ Feature: Step - groupCount()
     Given the modern graph
     And the traversal of
       """
-      g.V().out("created").groupCount("a").by("name").cap("a")
+      g.V().out("created").
+        groupCount("a").
+          by("name").
+        cap("a")
       """
     When iterated to list
     Then the result should be ordered
@@ -51,7 +54,9 @@ Feature: Step - groupCount()
     Given the modern graph
     And the traversal of
       """
-      g.V().out("created").values("name").groupCount("a").cap("a")
+      g.V().out("created").values("name").
+        groupCount("a").
+        cap("a")
       """
     When iterated to list
     Then the result should be ordered
@@ -61,7 +66,10 @@ Feature: Step - groupCount()
     Given the modern graph
     And the traversal of
       """
-      g.V().repeat(__.out().groupCount("a").by("name")).times(2).cap("a")
+      g.V().
+        repeat(__.out().groupCount("a").by("name")).
+          times(2).
+        cap("a")
       """
     When iterated to list
     Then the result should be ordered
@@ -71,7 +79,14 @@ Feature: Step - groupCount()
     Given the modern graph
     And the traversal of
       """
-      g.V().both().groupCount("a").by(T.label).as("b").barrier().where(__.select("a").select("software").is(P.gt(2))).select("b").values("name")
+      g.V().both().
+        groupCount("a").
+          by(T.label).as("b").
+        barrier().
+        where(__.select("a").
+              select("software").
+              is(P.gt(2))).
+        select("b").values("name")
       """
     When iterated to list
     Then the result should be unordered
@@ -92,7 +107,12 @@ Feature: Step - groupCount()
     Given the modern graph
     And the traversal of
       """
-      g.V().union(__.out("knows"), __.out("created").in("created")).groupCount().select(Column.values).unfold().sum()
+      g.V().union(__.out("knows"),
+                  __.out("created").in("created")).
+        groupCount().
+        select(Column.values).
+        unfold().
+        sum()
       """
     When iterated to list
     Then the result should be ordered
@@ -122,7 +142,8 @@ Feature: Step - groupCount()
     Given the modern graph
     And the traversal of
       """
-      g.V().union(__.repeat(__.out()).times(2).groupCount("m").by("lang"),__.repeat(__.in()).times(2).groupCount("m").by("name")).cap("m")
+      g.V().union(__.repeat(__.out()).times(2).groupCount("m").by("lang"),
+                  __.repeat(__.in()).times(2).groupCount("m").by("name")).cap("m")
       """
     When iterated to list
     Then the result should be ordered


Mime
View raw message