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")
评论列表
文章目录