mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-135386: Skip readonly tests for the root user (GH-138058)
This commit is contained in:
parent
8952b826a7
commit
5b0f00e616
1 changed files with 6 additions and 0 deletions
|
|
@ -16,6 +16,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):
|
||||
|
|
@ -92,6 +97,7 @@ def test_readonly_iter(self):
|
|||
self.assertEqual([k for k in self.db], [b"key1", b"key2"])
|
||||
|
||||
|
||||
@unittest.skipIf(root_in_posix, "test is meanless with root privilege")
|
||||
class ReadOnlyFilesystem(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue