diff options
author | Christian Heimes <christian@python.org> | 2022-06-06 17:24:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-06 17:24:11 (GMT) |
commit | 22fed605e096eb74f3aa33f6d25aee76fdc2a3fa (patch) | |
tree | cd15eb66416ec5aa0ad33e48b0c76f98bb811b45 /Lib/test/test_uu.py | |
parent | 56b5daf15970be449d44e91f08db84c698ac5506 (diff) | |
download | cpython-22fed605e096eb74f3aa33f6d25aee76fdc2a3fa.zip cpython-22fed605e096eb74f3aa33f6d25aee76fdc2a3fa.tar.gz cpython-22fed605e096eb74f3aa33f6d25aee76fdc2a3fa.tar.bz2 |
gh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534)
WASI does not have the ``chmod(2)`` syscall yet.
Diffstat (limited to 'Lib/test/test_uu.py')
-rw-r--r-- | Lib/test/test_uu.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_uu.py b/Lib/test/test_uu.py index 316a04a..0493aae 100644 --- a/Lib/test/test_uu.py +++ b/Lib/test/test_uu.py @@ -74,6 +74,7 @@ class UUTest(unittest.TestCase): with self.assertRaises(TypeError): uu.encode(inp, out, "t1", 0o644, True) + @os_helper.skip_unless_working_chmod def test_decode(self): for backtick in True, False: inp = io.BytesIO(encodedtextwrapped(0o666, "t1", backtick=backtick)) @@ -199,6 +200,8 @@ class UUFileTest(unittest.TestCase): s = fout.read() self.assertEqual(s, encodedtextwrapped(0o644, self.tmpin)) + # decode() calls chmod() + @os_helper.skip_unless_working_chmod def test_decode(self): with open(self.tmpin, 'wb') as f: f.write(encodedtextwrapped(0o644, self.tmpout)) @@ -211,6 +214,7 @@ class UUFileTest(unittest.TestCase): self.assertEqual(s, plaintext) # XXX is there an xp way to verify the mode? + @os_helper.skip_unless_working_chmod def test_decode_filename(self): with open(self.tmpin, 'wb') as f: f.write(encodedtextwrapped(0o644, self.tmpout)) @@ -221,6 +225,7 @@ class UUFileTest(unittest.TestCase): s = f.read() self.assertEqual(s, plaintext) + @os_helper.skip_unless_working_chmod def test_decodetwice(self): # Verify that decode() will refuse to overwrite an existing file with open(self.tmpin, 'wb') as f: @@ -231,6 +236,7 @@ class UUFileTest(unittest.TestCase): with open(self.tmpin, 'rb') as f: self.assertRaises(uu.Error, uu.decode, f) + @os_helper.skip_unless_working_chmod def test_decode_mode(self): # Verify that decode() will set the given mode for the out_file expected_mode = 0o444 |