Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3E8CC200BAD for ; Mon, 19 Sep 2016 19:32:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3D750160ACC; Mon, 19 Sep 2016 17:32:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 978AD160ADF for ; Mon, 19 Sep 2016 19:32:51 +0200 (CEST) Received: (qmail 81757 invoked by uid 500); 19 Sep 2016 17:32:50 -0000 Mailing-List: contact commits-help@tinkerpop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.apache.org Delivered-To: mailing list commits@tinkerpop.apache.org Received: (qmail 81415 invoked by uid 99); 19 Sep 2016 17:32:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2016 17:32:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 78B97E053F; Mon, 19 Sep 2016 17:32:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pieter@apache.org To: commits@tinkerpop.apache.org Date: Mon, 19 Sep 2016 17:33:23 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [35/50] [abbrv] tinkerpop git commit: Merge branch 'TINKERPOP-1448' archived-at: Mon, 19 Sep 2016 17:32:55 -0000 Merge branch 'TINKERPOP-1448' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/687ae742 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/687ae742 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/687ae742 Branch: refs/heads/TINKERPOP-1404 Commit: 687ae742d974482881e52c5c05a608d99020383d Parents: 2790dbb 1c5e698 Author: davebshow Authored: Thu Sep 15 12:14:54 2016 -0400 Committer: davebshow Committed: Thu Sep 15 12:14:54 2016 -0400 ---------------------------------------------------------------------- .../python/GraphTraversalSourceGenerator.groovy | 5 +++-- .../gremlin/python/TraversalSourceGenerator.groovy | 5 ++++- .../driver/driver_remote_connection.py | 2 +- .../gremlin_python/driver/remote_connection.py | 2 +- .../gremlin_python/process/graph_traversal.py | 3 ++- .../jython/gremlin_python/process/traversal.py | 6 +++++- .../src/main/jython/gremlin_python/statics.py | 17 +++++++++++++++++ .../jython/gremlin_python/structure/io/graphson.py | 10 +++++----- gremlin-python/src/main/jython/setup.py | 11 ++++++++++- .../tests/driver/test_driver_remote_connection.py | 12 ++++++------ .../jython/tests/structure/io/test_graphson.py | 16 +++++++++++----- .../src/main/jython/tests/structure/test_graph.py | 12 ++++++++---- 12 files changed, 73 insertions(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/687ae742/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/687ae742/gremlin-python/src/main/jython/gremlin_python/process/traversal.py ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/687ae742/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py ---------------------------------------------------------------------- diff --cc gremlin-python/src/main/jython/tests/structure/io/test_graphson.py index 6f244f5,675b060..99c9a45 --- a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py +++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py @@@ -83,15 -88,11 +89,15 @@@ class TestGraphSONReader(TestCase) class TestGraphSONWriter(TestCase): def test_numbers(self): - assert """{"@type":"g:Int32","@value":1}""" == GraphSONWriter.writeObject(1) - assert """{"@type":"g:Int64","@value":2}""" == GraphSONWriter.writeObject(2L) - assert """{"@type":"g:Float","@value":3.2}""" == GraphSONWriter.writeObject(3.2) + assert {"@type":"g:Int64","@value":2} == json.loads(GraphSONWriter.writeObject(long(2))) + assert {"@type":"g:Int32","@value":1} == json.loads(GraphSONWriter.writeObject(1)) + assert {"@type":"g:Float","@value":3.2} == json.loads(GraphSONWriter.writeObject(3.2)) assert """true""" == GraphSONWriter.writeObject(True) + def test_P(self): + assert """{"@type":"g:P","@value":{"predicate":"and","value":[{"@type":"g:P","@value":{"predicate":"or","value":[{"@type":"g:P","@value":{"predicate":"lt","value":"b"}},{"@type":"g:P","@value":{"predicate":"gt","value":"c"}}]}},{"@type":"g:P","@value":{"predicate":"neq","value":"d"}}]}}""" == GraphSONWriter.writeObject( + P.lt("b").or_(P.gt("c")).and_(P.neq("d"))) + if __name__ == '__main__': unittest.main()