diff options
author | Christian Heimes <christian@python.org> | 2022-03-08 11:17:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-08 11:17:30 (GMT) |
commit | 5081e78efde901556398615eb477c63c836686e5 (patch) | |
tree | 5be2667672a5d7a1df2b32b5a215546d1b5a5507 /Lib/distutils | |
parent | 36dd7396fcd26d8bf9919d536d05d7000becbe5b (diff) | |
download | cpython-5081e78efde901556398615eb477c63c836686e5.zip cpython-5081e78efde901556398615eb477c63c836686e5.tar.gz cpython-5081e78efde901556398615eb477c63c836686e5.tar.bz2 |
bpo-40280: Block more non-working syscalls in Emscripten (GH-31757)
- getgroups always fails.
- geteuid and getegid always return 0 (root), which confuse tarfile and
tests.
- hardlinks (link, linkat) always fails.
- non-encodable file names are not supported by NODERAWFS layer.
- mark more tests with dependency on subprocess and multiprocessing.
Mocking does not work if the module fails to import.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/tests/test_file_util.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_file_util.py b/Lib/distutils/tests/test_file_util.py index a614219..551151b 100644 --- a/Lib/distutils/tests/test_file_util.py +++ b/Lib/distutils/tests/test_file_util.py @@ -79,6 +79,7 @@ class FileUtilTestCase(support.TempdirManager, unittest.TestCase): fobj.write('spam eggs') move_file(self.source, self.target, verbose=0) + @unittest.skipUnless(hasattr(os, 'link'), 'requires os.link') def test_copy_file_hard_link(self): with open(self.source, 'w') as f: f.write('some content') @@ -99,6 +100,7 @@ class FileUtilTestCase(support.TempdirManager, unittest.TestCase): with open(self.source, 'r') as f: self.assertEqual(f.read(), 'some content') + @unittest.skipUnless(hasattr(os, 'link'), 'requires os.link') def test_copy_file_hard_link_failure(self): # If hard linking fails, copy_file() falls back on copying file # (some special filesystems don't support hard linking even under |