diff options
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 2372ac4..3b2d5fc 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -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") |