https://github.com/python/cpython/commit/ab8ffc482ecb08d125748a5e0b35b3f03a9371ea
commit: ab8ffc482ecb08d125748a5e0b35b3f03a9371ea
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2025-08-22T13:44:19Z
summary:

[3.13] gh-135386: Skip readonly tests for the root user (GH-138058) (GH-138064)

(cherry picked from commit 5b0f00e616738ededcf4b178dee8c30f5005e7ae)

Co-authored-by: Serhiy Storchaka <[email protected]>

files:
M Lib/test/test_dbm_sqlite3.py

diff --git a/Lib/test/test_dbm_sqlite3.py b/Lib/test/test_dbm_sqlite3.py
index ed846f946ec0b8..39eac7a35ec6ef 100644
--- a/Lib/test/test_dbm_sqlite3.py
+++ b/Lib/test/test_dbm_sqlite3.py
@@ -17,6 +17,11 @@
 from dbm.sqlite3 import _normalize_uri
 
 
+root_in_posix = False
+if hasattr(os, 'geteuid'):
+    root_in_posix = (os.geteuid() == 0)
+
+
 class _SQLiteDbmTests(unittest.TestCase):
 
     def setUp(self):
@@ -93,6 +98,7 @@ def test_readonly_iter(self):
         self.assertEqual([k for k in self.db], [b"key1", b"key2"])
 
 
[email protected](root_in_posix, "test is meanless with root privilege")
 class ReadOnlyFilesystem(unittest.TestCase):
 
     def setUp(self):

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to