mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-71052: Add test exclusions to support running the test suite on Android (#115918)
This commit is contained in:
parent
83c5ecdeec
commit
41d5391c55
12 changed files with 58 additions and 27 deletions
|
@ -1592,6 +1592,9 @@ class FwalkTests(WalkTests):
|
|||
@unittest.skipIf(
|
||||
support.is_emscripten, "Cannot dup stdout on Emscripten"
|
||||
)
|
||||
@unittest.skipIf(
|
||||
support.is_android, "dup return value is unpredictable on Android"
|
||||
)
|
||||
def test_fd_leak(self):
|
||||
# Since we're opening a lot of FDs, we must be careful to avoid leaks:
|
||||
# we both check that calling fwalk() a large number of times doesn't
|
||||
|
@ -2492,8 +2495,10 @@ class Pep383Tests(unittest.TestCase):
|
|||
# test listdir without arguments
|
||||
current_directory = os.getcwd()
|
||||
try:
|
||||
os.chdir(os.sep)
|
||||
self.assertEqual(set(os.listdir()), set(os.listdir(os.sep)))
|
||||
# The root directory is not readable on Android, so use a directory
|
||||
# we created ourselves.
|
||||
os.chdir(self.dir)
|
||||
self.assertEqual(set(os.listdir()), expected)
|
||||
finally:
|
||||
os.chdir(current_directory)
|
||||
|
||||
|
@ -4838,7 +4843,7 @@ class TestScandir(unittest.TestCase):
|
|||
os.name == 'nt')
|
||||
|
||||
def test_attributes(self):
|
||||
link = hasattr(os, 'link')
|
||||
link = os_helper.can_hardlink()
|
||||
symlink = os_helper.can_symlink()
|
||||
|
||||
dirname = os.path.join(self.path, "dir")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue