Skip to content

Commit 029dd9d

Browse files
author
Ghislain Fourny
committed
Add test.
1 parent 262b767 commit 029dd9d

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

tests/test_bugfix_keywords.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from jsoniq import RumbleSession
2+
from unittest import TestCase
3+
import json
4+
class TryTesting(TestCase):
5+
def test1(self):
6+
# The syntax to start a session is similar to that of Spark.
7+
# A RumbleSession is a SparkSession that additionally knows about RumbleDB.
8+
# All attributes and methods of SparkSession are also available on RumbleSession.
9+
rumble = RumbleSession.builder.appName("PyRumbleExample").getOrCreate();
10+
# A more complex, standalone query
11+
12+
seq = rumble.jsoniq("""
13+
let $node := { "binary" : "af12" }
14+
return $node.binary
15+
""");
16+
17+
expected = ('af12',)
18+
19+
self.assertTrue(json.dumps(seq.json()) == json.dumps(expected))

0 commit comments

Comments
 (0)