mirror of
https://github.com/python/cpython.git
synced 2025-10-06 07:02:33 +00:00
[3.6] bpo-28759: Skip some tests on PermissionError raised by Android (GH-4350) (#4380)
(cherry picked from commit 92c2ca7633
)
This commit is contained in:
parent
ea5b545e38
commit
ad004f9b5a
7 changed files with 50 additions and 35 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:
|
||||
|
@ -1914,10 +1913,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