File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
graalpython/com.oracle.graal.python.test/src/tests Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,18 @@ def test_basic_functionality():
52
52
53
53
54
54
def test_fts5_works ():
55
+ # we explicitly enable those features below, but on CPython they might not
56
+ # be available if using some system libsqlite that doesn't have them
55
57
import sqlite3
56
58
conn = sqlite3 .connect (':memory:' )
57
- conn .execute ("CREATE VIRTUAL TABLE IF NOT EXISTS your_table USING fts5(column1, column2)" )
58
- conn .execute ("CREATE VIRTUAL TABLE IF NOT EXISTS your_table USING fts4(column1, column2)" )
59
- conn .execute ("CREATE VIRTUAL TABLE IF NOT EXISTS your_table USING fts3(column1, column2)" )
60
- conn .execute ("CREATE VIRTUAL TABLE IF NOT EXISTS your_table USING rtree(column1, column2)" )
61
- sqpi = next (conn .execute ("SELECT pi()" ))[0 ]
62
- assert 3.14 == float (f'{ sqpi :.2f} ' ), sqpi
59
+ try :
60
+ conn .execute ("CREATE VIRTUAL TABLE IF NOT EXISTS your_table USING fts5(column1, column2)" )
61
+ conn .execute ("CREATE VIRTUAL TABLE IF NOT EXISTS your_table USING fts4(column1, column2)" )
62
+ conn .execute ("CREATE VIRTUAL TABLE IF NOT EXISTS your_table USING fts3(column1, column2)" )
63
+ conn .execute ("CREATE VIRTUAL TABLE IF NOT EXISTS your_table USING rtree(column1, column2)" )
64
+ sqpi = next (conn .execute ("SELECT pi()" ))[0 ]
65
+ assert 3.14 == float (f'{ sqpi :.2f} ' ), sqpi
66
+ except sqlite3 .OperationalError :
67
+ import sys
68
+ assert sys .implementation .name != "graalpy"
63
69
conn .close ()
You can’t perform that action at this time.
0 commit comments