summaryrefslogtreecommitdiff
path: root/Lib/test/test_genericpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_genericpath.py')
-rw-r--r--Lib/test/test_genericpath.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py
index f698e13f68..01e11da098 100644
--- a/Lib/test/test_genericpath.py
+++ b/Lib/test/test_genericpath.py
@@ -8,7 +8,6 @@ import sys
import unittest
import warnings
from test import support
-android_not_root = support.android_not_root
def create_file(filename, data=b'foo'):
@@ -213,9 +212,11 @@ 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)
+ try:
+ self._test_samefile_on_link_func(os.link)
+ except PermissionError as e:
+ self.skipTest('os.link(): %s' % e)
def test_samestat(self):
test_fn1 = support.TESTFN
@@ -253,9 +254,11 @@ 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)
+ try:
+ self._test_samestat_on_link_func(os.link)
+ except PermissionError as e:
+ self.skipTest('os.link(): %s' % e)
def test_sameopenfile(self):
filename = support.TESTFN