mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
gh-135386: Skip readonly tests for the root user (GH-138058)
This commit is contained in:
parent
8952b826a7
commit
5b0f00e616
@ -16,6 +16,11 @@ import sqlite3
|
||||
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 @@ class ReadOnly(_SQLiteDbmTests):
|
||||
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…
x
Reference in New Issue
Block a user