mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-28759: Skip some tests on PermissionError raised by Android (GH-4350)
Access to mkfifo(), mknod() and hard link creation is controled by SELinux on Android. Also remove test.support.android_not_root.
This commit is contained in:
parent
e0582a37c8
commit
92c2ca7633
7 changed files with 50 additions and 34 deletions
|
@ -11,7 +11,6 @@ import unittest
|
|||
from unittest import mock
|
||||
|
||||
from test import support
|
||||
android_not_root = support.android_not_root
|
||||
TESTFN = support.TESTFN
|
||||
|
||||
try:
|
||||
|
@ -1911,10 +1910,12 @@ class _BasePathTest(object):
|
|||
self.assertFalse((P / 'fileA' / 'bah').is_fifo())
|
||||
|
||||
@unittest.skipUnless(hasattr(os, "mkfifo"), "os.mkfifo() required")
|
||||
@unittest.skipIf(android_not_root, "mkfifo not allowed, non root user")
|
||||
def test_is_fifo_true(self):
|
||||
P = self.cls(BASE, 'myfifo')
|
||||
os.mkfifo(str(P))
|
||||
try:
|
||||
os.mkfifo(str(P))
|
||||
except PermissionError as e:
|
||||
self.skipTest('os.mkfifo(): %s' % e)
|
||||
self.assertTrue(P.is_fifo())
|
||||
self.assertFalse(P.is_socket())
|
||||
self.assertFalse(P.is_file())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue