Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test_shared_cache_deprecated on macOS
  • Loading branch information
Erlend E. Aasland committed Jan 8, 2021
commit 260bbf3c7d6029b0448d948672f99350171a4d7a
7 changes: 6 additions & 1 deletion Lib/sqlite3/test/dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ def test_not_supported_error(self):
def test_shared_cache_deprecated(self):
for enable in (True, False):
with self.assertWarns(DeprecationWarning) as cm:
sqlite.enable_shared_cache(enable)
try:
sqlite.enable_shared_cache(enable)
except sqlite.OperationalError as err:
# See issue 24464 and https://sqlite.org/c3ref/enable_shared_cache.html
import sys
self.assertEqual(sys.platform, 'darwin')
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated
self.assertIn("dbapi.py", cm.filename)


Expand Down