Commit d7d4fea4 authored by xdegaye's avatar xdegaye Committed by GitHub

bpo-29181: Skip test_tarfile tests on PermissionError raised by Android (GH-4375)

parent 6a55d095
......@@ -1147,7 +1147,10 @@ class WriteTest(WriteTestBase, unittest.TestCase):
target = os.path.join(TEMPDIR, "link_target")
with open(target, "wb") as fobj:
fobj.write(b"aaa")
os.link(target, link)
try:
os.link(target, link)
except PermissionError as e:
self.skipTest('os.link(): %s' % e)
try:
tar = tarfile.open(tmpname, self.mode)
try:
......@@ -1609,7 +1612,10 @@ class HardlinkTest(unittest.TestCase):
with open(self.foo, "wb") as fobj:
fobj.write(b"foo")
os.link(self.foo, self.bar)
try:
os.link(self.foo, self.bar)
except PermissionError as e:
self.skipTest('os.link(): %s' % e)
self.tar = tarfile.open(tmpname, "w")
self.tar.add(self.foo)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment