diff options
author | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2016-12-13 09:00:01 (GMT) |
---|---|---|
committer | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2016-12-13 09:00:01 (GMT) |
commit | 3a4e989324cc1f75c9f749c9e1c20de2f43df6e3 (patch) | |
tree | 909f3c636598c4ec5a76916801cb91861ded71ce /Lib/test/test_shutil.py | |
parent | fb24eead481a00c9bb86c436461971790fce7937 (diff) | |
download | cpython-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_shutil.py')
-rw-r--r-- | Lib/test/test_shutil.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index af5f00f..46e2c57 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -22,7 +22,8 @@ import tarfile import warnings from test import support -from test.support import TESTFN, check_warnings, captured_stdout, requires_zlib +from test.support import (TESTFN, check_warnings, captured_stdout, + requires_zlib, android_not_root) try: import bz2 @@ -787,6 +788,7 @@ class TestShutil(unittest.TestCase): @unittest.skipIf(os.name == 'nt', 'temporarily disabled on Windows') @unittest.skipUnless(hasattr(os, 'link'), 'requires os.link') + @unittest.skipIf(android_not_root, "hard links not allowed, non root user") def test_dont_copy_file_onto_link_to_itself(self): # bug 851123. os.mkdir(TESTFN) @@ -839,6 +841,7 @@ class TestShutil(unittest.TestCase): # Issue #3002: copyfile and copytree block indefinitely on named pipes @unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()') + @unittest.skipIf(android_not_root, "mkfifo not allowed, non root user") def test_copyfile_named_pipe(self): os.mkfifo(TESTFN) try: @@ -849,6 +852,7 @@ class TestShutil(unittest.TestCase): finally: os.remove(TESTFN) + @unittest.skipIf(android_not_root, "mkfifo not allowed, non root user") @unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()') @support.skip_unless_symlink def test_copytree_named_pipe(self): |