Skip to content

Commit

Permalink
unit test share memory
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrabel committed Oct 28, 2023
1 parent f021221 commit a288c22
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ropetest/contrib/autoimport/autoimporttest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ def database_list(connection):
return list(connection.execute("PRAGMA database_list"))


def test_in_memory_database_share_cache(project):
ai1 = AutoImport(project, memory=True)
ai2 = AutoImport(project, memory=True)

with ai1.connection:
ai1.connection.execute("CREATE TABLE shared(data)")
ai1.connection.execute("INSERT INTO shared VALUES(28)")
res = ai2.connection.execute("SELECT data FROM shared")
assert res.fetchone() == (28,)


def test_autoimport_connection_parameter_with_in_memory(
project: Project,
autoimport: AutoImport,
Expand Down

0 comments on commit a288c22

Please sign in to comment.