MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_folder_file_perms

Method test_folder_file_perms

Lib/test/test_mailbox.py:989–1001  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

987
988 @unittest.skipUnless(hasattr(os, 'umask'), 'test needs os.umask()')
989 def test_folder_file_perms(self):
990 # From bug #3228, we want to verify that the file created inside a Maildir
991 # subfolder isn't marked as executable.
992 orig_umask = os.umask(0)
993 try:
994 subfolder = self._box.add_folder('subfolder')
995 finally:
996 os.umask(orig_umask)
997
998 path = os.path.join(subfolder._path, 'maildirfolder')
999 st = os.stat(path)
1000 perms = st.st_mode
1001 self.assertFalse((perms & 0o111)) # Execute bits should all be off.
1002
1003 def test_reread(self):
1004 # Do an initial unconditional refresh

Callers

nothing calls this directly

Calls 4

assertFalseMethod · 0.80
add_folderMethod · 0.45
joinMethod · 0.45
statMethod · 0.45

Tested by

no test coverage detected