def test_path_no_perms(self): with utils.NamedTemporaryDirectory() as tmp_d: os.chmod(tmp_d, stat.S_IREAD | stat.S_IRGRP | stat.S_IROTH) self.assertFalse(utils.is_writeable(tmp_d))