本文整理汇总了Python中pyupdater.client.downloader.FileDownloader.download_max_size方法的典型用法代码示例。如果您正苦于以下问题:Python FileDownloader.download_max_size方法的具体用法?Python FileDownloader.download_max_size怎么用?Python FileDownloader.download_max_size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyupdater.client.downloader.FileDownloader
的用法示例。
在下文中一共展示了FileDownloader.download_max_size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_cb
# 需要导入模块: from pyupdater.client.downloader import FileDownloader [as 别名]
# 或者: from pyupdater.client.downloader.FileDownloader import download_max_size [as 别名]
def test_cb(self, download_max_size):
def cb(status):
pass
fd = FileDownloader(FILENAME, URLS, hexdigest=FILE_HASH,
progress_hooks=[cb], verify=True)
fd.download_max_size = download_max_size
binary_data = fd.download_verify_return()
assert binary_data is not None
示例2: test_return_fail
# 需要导入模块: from pyupdater.client.downloader import FileDownloader [as 别名]
# 或者: from pyupdater.client.downloader.FileDownloader import download_max_size [as 别名]
def test_return_fail(self, download_max_size):
fd = FileDownloader(FILENAME, URLS,
'JKFEIFJILEFJ983NKFNKL', verify=True)
fd.download_max_size = download_max_size
binary_data = fd.download_verify_return()
assert binary_data is None
示例3: test_return
# 需要导入模块: from pyupdater.client.downloader import FileDownloader [as 别名]
# 或者: from pyupdater.client.downloader.FileDownloader import download_max_size [as 别名]
def test_return(self, download_max_size):
fd = FileDownloader(FILENAME, URLS, FILE_HASH, verify=True)
fd.download_max_size = download_max_size
binary_data = fd.download_verify_return()
assert binary_data is not None