Skip to content

Commit bd405f2

Browse files
committed
Skip platform-dependent write failure tests in readonly directory
1 parent b586fc3 commit bd405f2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_dbm_sqlite3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_open_readonly_file_fail_rw(self):
150150
with dbm_sqlite3.open(self.db_path, "w") as db:
151151
with self.assertRaises(OSError):
152152
db[b"newkey"] = b"newvalue"
153-
153+
@unittest.skipUnless(sys.platform == "darwin", "SQLite fallback behavior differs on non-macOS")
154154
def test_open_readonly_dir_fail_rw_missing_wal_shm(self):
155155
for suffix in ("-wal", "-shm"):
156156
os_helper.unlink(self.db_path + suffix)
@@ -161,7 +161,7 @@ def test_open_readonly_dir_fail_rw_missing_wal_shm(self):
161161
with dbm_sqlite3.open(self.db_path, "w") as db:
162162
db[b"newkey"] = b"newvalue"
163163

164-
164+
@unittest.skipUnless(sys.platform == "darwin", "SQLite fallback behavior differs on non-macOS")
165165
def test_open_readonly_dir_fail_rw_with_writable_db(self):
166166
os.chmod(self.db_path, stat.S_IREAD | stat.S_IWRITE)
167167
for suffix in ("-wal", "-shm"):

0 commit comments

Comments
 (0)