Skip to content

Commit

Permalink
Add smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
karpetrosyan committed Sep 30, 2023
1 parent 7fa7c12 commit 5c5dc89
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_smoke.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import pytest
import anysqlite

@pytest.mark.anyio
async def test_anysqlite():
db = await anysqlite.connect(":memory:")

try:
cursor = await db.cursor()
await cursor.execute("CREATE TABLE anysqlite_test(version TEXT)")
await cursor.execute("INSERT INTO anysqlite_test VALUES(?)", [anysqlite.__version__])
await cursor.execute("SELECT * FROM anysqlite_test")

assert (anysqlite.__version__, ) == await cursor.fetchone()
finally:
await db.close()

0 comments on commit 5c5dc89

Please sign in to comment.