summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tempfile.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-03-17 11:09:57 (GMT)
committerGitHub <noreply@github.com>2022-03-17 11:09:57 (GMT)
commitef1327e3b622e0cafdf8bfc1f480fed0dd386be6 (patch)
tree30a0e34b5a38b7dd997e5223880618a9b3e5acbd /Lib/test/test_tempfile.py
parentc2e3c06139e9468efb32629d147d99a1672d9e19 (diff)
downloadcpython-ef1327e3b622e0cafdf8bfc1f480fed0dd386be6.zip
cpython-ef1327e3b622e0cafdf8bfc1f480fed0dd386be6.tar.gz
cpython-ef1327e3b622e0cafdf8bfc1f480fed0dd386be6.tar.bz2
bpo-40280: Skip more tests on Emscripten (GH-31947)
- lchmod, lchown are not fully implemented - skip umask tests - cannot fstat unlinked or renamed files yet - ignore musl libc issues that affect Emscripten
Diffstat (limited to 'Lib/test/test_tempfile.py')
-rw-r--r--Lib/test/test_tempfile.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py
index 25fddae..a684718 100644
--- a/Lib/test/test_tempfile.py
+++ b/Lib/test/test_tempfile.py
@@ -341,6 +341,9 @@ def _mock_candidate_names(*names):
class TestBadTempdir:
+ @unittest.skipIf(
+ support.is_emscripten, "Emscripten cannot remove write bits."
+ )
def test_read_only_directory(self):
with _inside_empty_temp_dir():
oldmode = mode = os.stat(tempfile.tempdir).st_mode
@@ -465,6 +468,7 @@ class TestMkstempInner(TestBadTempdir, BaseTestCase):
self.assertEqual(mode, expected)
@unittest.skipUnless(has_spawnl, 'os.spawnl not available')
+ @support.requires_subprocess()
def test_noinherit(self):
# _mkstemp_inner file handles are not inherited by child processes
@@ -1282,6 +1286,9 @@ class TestSpooledTemporaryFile(BaseTestCase):
pass
self.assertRaises(ValueError, use_closed)
+ @unittest.skipIf(
+ support.is_emscripten, "Emscripten cannot fstat renamed files."
+ )
def test_truncate_with_size_parameter(self):
# A SpooledTemporaryFile can be truncated to zero size
f = tempfile.SpooledTemporaryFile(max_size=10)