def METHOD_NAME(self, expected_permissions, name):
    full_path = self.full_path(name)
    actual_file_permissions = stat.S_IMODE(os.stat(full_path).st_mode)
    if sys.platform != "win32":
        self.assertEqual(oct(expected_permissions), oct(actual_file_permissions))
    else:
        self.assertEqual(oct(0o666), oct(actual_file_permissions))