def testCopyUserModeToGroup(self): with temporaryPath() as path: for initialMode, expectedMode in self.modesList: os.chmod(path, initialMode) fileUtils.copyUserModeToGroup(path) self.assertEqual( os.stat(path).st_mode & self.MODE_MASK, expectedMode)
def testCopyUserModeToGroup(self): with temporaryPath() as path: for initialMode, expectedMode in self.modesList: os.chmod(path, initialMode) fileUtils.copyUserModeToGroup(path) self.assertEquals(os.stat(path).st_mode & self.MODE_MASK, expectedMode)