test_pywalib.py 文件源码

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

项目:PyWallet 作者: AndreMiras 项目源码 文件源码
def test_get_default_keystore_path(self):
        """
        Checks we the default keystore directory exists or create it.
        Verify the path is correct and that we have read/write access to it.
        """
        keystore_dir = PyWalib.get_default_keystore_path()
        if not os.path.exists(keystore_dir):
            os.makedirs(keystore_dir)
        # checks path correctness
        self.assertTrue(keystore_dir.endswith(".config/pyethapp/keystore/"))
        # checks read/write access
        self.assertEqual(os.access(keystore_dir, os.R_OK), True)
        self.assertEqual(os.access(keystore_dir, os.W_OK), True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号