test_sandbox.py 文件源码

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

项目:BD_T2 作者: jfmolano1587 项目源码 文件源码
def test_win32com(self):
            """
            win32com should not be prevented from caching COM interfaces
            in gen_py.
            """
            import win32com
            gen_py = win32com.__gen_path__
            target = os.path.join(gen_py, 'test_write')
            sandbox = DirectorySandbox(self.dir)
            try:
                try:
                    sandbox.run(self._file_writer(target))
                except SandboxViolation:
                    self.fail("Could not create gen_py file due to SandboxViolation")
            finally:
                if os.path.exists(target): os.remove(target)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号