MCPcopy Index your code
hub / github.com/python/cpython / test_folder_file_perms

Method test_folder_file_perms

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

Source from the content-addressed store, hash-verified

993
994 @unittest.skipUnless(hasattr(os, 'umask'), 'test needs os.umask()')
995 def test_folder_file_perms(self):
996 # From bug #3228, we want to verify that the file created inside a Maildir
997 # subfolder isn't marked as executable.
998 orig_umask = os.umask(0)
999 try:
1000 subfolder = self._box.add_folder('subfolder')
1001 finally:
1002 os.umask(orig_umask)
1003
1004 path = os.path.join(subfolder._path, 'maildirfolder')
1005 st = os.stat(path)
1006 perms = st.st_mode
1007 self.assertFalse((perms & 0o111)) # Execute bits should all be off.
1008
1009 def test_reread(self):
1010 # 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