From c944df827fcf6fb5d99bc8399049ed312e40c670 Mon Sep 17 00:00:00 2001 From: Ad Timmering <8476375+awtimmering@users.noreply.github.com> Date: Mon, 29 Jun 2020 14:51:43 +0900 Subject: [PATCH] [3.1.x] Fixed #30807 -- Fixed TestArchive.test_extract_file_permissions() when umask is 0o000. Fixed test that checks permissions on files extracted from archives with no permissions set, to not assume a default umask of 0o002. Test regression in c95d063e776e849cf1a0bf616c654165cb89c706. Backport of ec5aa2161d8015a3fe57dcbbfe14200cd18f0a16 from master --- tests/utils_tests/test_archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils_tests/test_archive.py b/tests/utils_tests/test_archive.py index dfbef8ab184..dc7c4b4ebd9 100644 --- a/tests/utils_tests/test_archive.py +++ b/tests/utils_tests/test_archive.py @@ -44,4 +44,4 @@ class TestArchive(unittest.TestCase): self.assertEqual(os.stat(filepath).st_mode & mask, 0o775) # A file is readable even if permission data is missing. filepath = os.path.join(tmpdir, 'no_permissions') - self.assertEqual(os.stat(filepath).st_mode & mask, 0o664 & ~umask) + self.assertEqual(os.stat(filepath).st_mode & mask, 0o666 & ~umask)