tests.py 文件源码

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

项目:nittygriddy 作者: cbourjau 项目源码 文件源码
def test_download_one_file(self):
        try:
            shutil.rmtree("/tmp/nitty_test")
        except:
            pass
        remote_path = "/alice/cern.ch/user/c/cbourjau/nitty_test/AnalysisResults.root"
        utils.download_file(remote_path,
                            "/tmp/nitty_test/AnalysisResults.root")
        self.assertTrue(os.path.isfile("/tmp/nitty_test/AnalysisResults.root"))
        shutil.rmtree("/tmp/nitty_test")
        # without specifiying dest file name:
        utils.download_file(remote_path,
                            "/tmp/nitty_test/")
        self.assertTrue(os.path.isfile("/tmp/nitty_test/AnalysisResults.root"))
        shutil.rmtree("/tmp/nitty_test")

    # @skip("Skip download test")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号