Skip to content

Commit

Permalink
add CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrabel committed Oct 28, 2023
1 parent fd89af7 commit 9f3c7a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- #710, #561 Implement `except*` syntax (@lieryan)
- #711 allow building documentation without having rope module installed (@kloczek)
- #719 Create in-memory databases with shared cache per project to support a one-thread-one-autoimport model in multithreading environments (@tkrabel)

# Release 1.10.0

Expand Down
16 changes: 8 additions & 8 deletions ropetest/contrib/autoimport/autoimporttest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ def database_list(connection):


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

ai3 = AutoImport(project2, memory=True)
ai_3 = AutoImport(project2, memory=True)

with ai1.connection:
ai1.connection.execute("CREATE TABLE shared(data)")
ai1.connection.execute("INSERT INTO shared VALUES(28)")
assert ai2.connection.execute("SELECT data FROM shared").fetchone() == (28,)
with ai_1.connection:
ai_1.connection.execute("CREATE TABLE shared(data)")
ai_1.connection.execute("INSERT INTO shared VALUES(28)")
assert ai_2.connection.execute("SELECT data FROM shared").fetchone() == (28,)
with pytest.raises(sqlite3.OperationalError, match="no such table: shared"):
ai3.connection.execute("SELECT data FROM shared").fetchone()
ai_3.connection.execute("SELECT data FROM shared").fetchone()


def test_autoimport_connection_parameter_with_in_memory(
Expand Down

0 comments on commit 9f3c7a3

Please sign in to comment.