Skip to content

Commit 0668636

Browse files
committed
int64 test cov
1 parent 03c74d1 commit 0668636

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_suite.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,15 @@ def test_fetch_expression(provider):
173173
res = cur.execute("SELECT QUOTE(email) FROM users")
174174
assert [("'alice@example.com'",)] == res.fetchall()
175175

176+
@pytest.mark.parametrize("provider", ["libsql", "sqlite"])
177+
def test_int64(provider):
178+
conn = connect(provider, ":memory:")
179+
cur = conn.cursor()
180+
cur.execute("CREATE TABLE data (id INTEGER, number INTEGER)")
181+
conn.commit()
182+
cur.execute("INSERT INTO data VALUES (1, 1099511627776)") # 1 << 40
183+
res = cur.execute("SELECT * FROM data")
184+
assert [(1,1099511627776)] == res.fetchall()
176185

177186
def connect(provider, database, isolation_level='DEFERRED'):
178187
if provider == "libsql-remote":

0 commit comments

Comments
 (0)