You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/06/21 21:26:09 UTC
tinkerpop git commit: TINKERPOP-1864 Run python glv tests on GraphSON
2.0 and 3.0
Repository: tinkerpop
Updated Branches:
refs/heads/TINKERPOP-1864 [created] 6bd319996
TINKERPOP-1864 Run python glv tests on GraphSON 2.0 and 3.0
There was about a 10 second time increase for adding the additional test execution option. Seems worthwhile.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6bd31999
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6bd31999
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6bd31999
Branch: refs/heads/TINKERPOP-1864
Commit: 6bd3199967608b8f1fd66ac1c72ccbbce7b76418
Parents: e1ef8b6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Jun 21 17:24:58 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jun 21 17:24:58 2018 -0400
----------------------------------------------------------------------
gremlin-python/pom.xml | 10 +++++++++-
gremlin-python/src/main/jython/radish/terrain.py | 3 ++-
gremlin-python/src/main/jython/setup.py | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6bd31999/gremlin-python/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml
index e48901c..fdb4642 100644
--- a/gremlin-python/pom.xml
+++ b/gremlin-python/pom.xml
@@ -420,11 +420,19 @@ limitations under the License.
<env key="PYTHONPATH" value=""/>
<arg line="setup.py install"/>
</exec>
+ <!-- run for graphson 3.0 -->
<exec executable="env/bin/radish" dir="${project.build.directory}/python2"
failonerror="true">
<env key="PYTHONPATH" value=""/>
<env key="PYTHONIOENCODING" value="utf-8:surrogateescape"/>
- <arg line="-e -t -b ${project.build.directory}/python2/radish ${project.basedir}/../gremlin-test/features/"/> <!-- -no-line-jump -->
+ <arg line="-e -t -b ${project.build.directory}/python2/radish ${project.basedir}/../gremlin-test/features/ --user-data="graphson=v2""/> <!-- -no-line-jump -->
+ </exec>
+ <!-- run for graphson 3.0 -->
+ <exec executable="env/bin/radish" dir="${project.build.directory}/python2"
+ failonerror="true">
+ <env key="PYTHONPATH" value=""/>
+ <env key="PYTHONIOENCODING" value="utf-8:surrogateescape"/>
+ <arg line="-e -t -b ${project.build.directory}/python2/radish ${project.basedir}/../gremlin-test/features/ --user-data="graphson=v3""/> <!-- -no-line-jump -->
</exec>
</target>
</configuration>
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6bd31999/gremlin-python/src/main/jython/radish/terrain.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/terrain.py b/gremlin-python/src/main/jython/radish/terrain.py
index ba8f372..ceb72bc 100644
--- a/gremlin-python/src/main/jython/radish/terrain.py
+++ b/gremlin-python/src/main/jython/radish/terrain.py
@@ -66,7 +66,8 @@ def prepare_static_traversal_source(features, marker):
@before.each_scenario
def prepare_traversal_source(scenario):
# some tests create data - create a fresh remote to the empty graph and clear that graph prior to each test
- remote = DriverRemoteConnection('ws://localhost:45940/gremlin', "ggraph", message_serializer=serializer.GraphSONSerializersV3d0())
+ s = serializer.GraphSONSerializersV3d0() if world.config.user_data["graphson"] == "v3" else serializer.GraphSONSerializersV2d0()
+ remote = DriverRemoteConnection('ws://localhost:45940/gremlin', "ggraph", message_serializer=s)
scenario.context.remote_conn["empty"] = remote
g = Graph().traversal().withRemote(remote)
g.V().drop().iterate()
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6bd31999/gremlin-python/src/main/jython/setup.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/setup.py b/gremlin-python/src/main/jython/setup.py
index 5d26749..5bde9ed 100644
--- a/gremlin-python/src/main/jython/setup.py
+++ b/gremlin-python/src/main/jython/setup.py
@@ -71,7 +71,7 @@ setup(
tests_require=[
'pytest',
'mock',
- 'radish-bdd==0.8.0',
+ 'radish-bdd==0.8.6',
'PyHamcrest'
],
install_requires=install_requires,