test_xdg.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:http-prompt 作者: eliangcs 项目源码 文件源码
def test_get_app_config_home(self):
        path = xdg.get_config_dir()
        expected_path = os.path.join(os.environ[self.homes['config']],
                                     'http-prompt')
        self.assertEqual(path, expected_path)
        self.assertTrue(os.path.exists(path))

        if sys.platform != 'win32':
            # Make sure permission for the directory is 700
            mask = stat.S_IMODE(os.stat(path).st_mode)
            self.assertTrue(mask & stat.S_IRWXU)
            self.assertFalse(mask & stat.S_IRWXG)
            self.assertFalse(mask & stat.S_IRWXO)
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号