This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch miscGremlinLangGBandResultSetFixes in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit d3ffb5d2984d5a2859a2a6895e720fba8a456d56 Author: Cole Greer <[email protected]> AuthorDate: Mon Mar 30 15:10:36 2026 -0700 add extra python GremlinLang cases to validate tzinfo handling. --- .../src/main/python/tests/unit/process/test_gremlin_lang.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gremlin-python/src/main/python/tests/unit/process/test_gremlin_lang.py b/gremlin-python/src/main/python/tests/unit/process/test_gremlin_lang.py index 52939aca9b..b4c738a7ac 100644 --- a/gremlin-python/src/main/python/tests/unit/process/test_gremlin_lang.py +++ b/gremlin-python/src/main/python/tests/unit/process/test_gremlin_lang.py @@ -28,7 +28,7 @@ from gremlin_python.statics import SingleByte, short, long, bigint, BigDecimal from gremlin_python.structure.graph import Graph, Vertex, Edge, VertexProperty from gremlin_python.process.anonymous_traversal import traversal from gremlin_python.process.graph_traversal import __ -from datetime import datetime +from datetime import datetime, timezone, timedelta class TestGremlinLang(object): @@ -470,6 +470,16 @@ class TestGremlinLang(object): tests.append([g.inject(uuid.UUID('9b8d8a9c-61c2-43e5-9cc8-c27b9261290e')), 'g.inject(UUID("9b8d8a9c-61c2-43e5-9cc8-c27b9261290e"))']) + # 119 + tests.append([g.add_v('test').property('date', datetime(2021, 2, 1, 9, 30, tzinfo=timezone.utc)), + "g.addV('test').property('date',datetime(\"2021-02-01T09:30:00+00:00\"))"]) + # 120 + tests.append([g.add_v('test').property('date', datetime(2021, 2, 1, 9, 30, tzinfo=timezone(timedelta(hours=7)))), + "g.addV('test').property('date',datetime(\"2021-02-01T09:30:00+07:00\"))"]) + # 121 + tests.append([g.add_v('test').property('date', datetime(2021, 2, 1, 9, 30, tzinfo=timezone(timedelta(hours=-5)))), + "g.addV('test').property('date',datetime(\"2021-02-01T09:30:00-05:00\"))"]) + for t in range(len(tests)): gremlin_lang = tests[t][0].gremlin_lang.get_gremlin() assert gremlin_lang == tests[t][1]
