summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_genericpath.py
diff options
context:
space:
mode:
authorXavier de Gaye <xdegaye@users.sourceforge.net>2016-12-13 09:00:01 (GMT)
committerXavier de Gaye <xdegaye@users.sourceforge.net>2016-12-13 09:00:01 (GMT)
commit3a4e989324cc1f75c9f749c9e1c20de2f43df6e3 (patch)
tree909f3c636598c4ec5a76916801cb91861ded71ce /Lib/test/test_genericpath.py
parentfb24eead481a00c9bb86c436461971790fce7937 (diff)
downloadcpython-3a4e989324cc1f75c9f749c9e1c20de2f43df6e3.zip
cpython-3a4e989324cc1f75c9f749c9e1c20de2f43df6e3.tar.gz
cpython-3a4e989324cc1f75c9f749c9e1c20de2f43df6e3.tar.bz2
Issue #28759: Fix the tests that fail with PermissionError when run as
a non-root user on Android where access rights are controled by SELinux MAC.
Diffstat (limited to 'Lib/test/test_genericpath.py')
-rw-r--r--Lib/test/test_genericpath.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py
index ae5dd6a..f698e13 100644
--- a/Lib/test/test_genericpath.py
+++ b/Lib/test/test_genericpath.py
@@ -8,6 +8,7 @@ import sys
import unittest
import warnings
from test import support
+android_not_root = support.android_not_root
def create_file(filename, data=b'foo'):
@@ -212,6 +213,7 @@ class GenericTest:
def test_samefile_on_symlink(self):
self._test_samefile_on_link_func(os.symlink)
+ @unittest.skipIf(android_not_root, "hard links not allowed, non root user")
def test_samefile_on_link(self):
self._test_samefile_on_link_func(os.link)
@@ -251,6 +253,7 @@ class GenericTest:
def test_samestat_on_symlink(self):
self._test_samestat_on_link_func(os.symlink)
+ @unittest.skipIf(android_not_root, "hard links not allowed, non root user")
def test_samestat_on_link(self):
self._test_samestat_on_link_func(os.link)