本文整理汇总了Python中server.FILES类的典型用法代码示例。如果您正苦于以下问题:Python FILES类的具体用法?Python FILES怎么用?Python FILES使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FILES类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_get_tree
def test_get_tree(self):
"""
Download entire tree
"""
with hide("everything"):
get("tree", self.tmpdir)
leaves = list(filter(lambda x: x[0].startswith("/tree"), FILES.items()))
for path, contents in leaves:
eq_contents(self.path(path[1:]), contents)
开发者ID:dmuralik,项目名称:datascience,代码行数:9,代码来源:test_operations.py
示例2: test_get_tree
def test_get_tree(self):
"""
Download entire tree
"""
with hide('everything'):
get('tree', self.tmpdir)
leaves = filter(lambda x: x[0].startswith('/tree'), FILES.items())
for path, contents in leaves:
eq_contents(self.path(path[1:]), contents)
开发者ID:itsmeallan,项目名称:fabric,代码行数:9,代码来源:test_operations.py
示例3: test_get_tree
def test_get_tree(self):
"""
Download entire tree
"""
with hide('everything'):
get('tree', self.tmpdir)
leaves = [x for x in list(FILES.items()) if x[0].startswith('/tree')]
for path, contents in leaves:
eq_contents(self.path(path[1:]), contents)
开发者ID:brettatoms,项目名称:fabric,代码行数:9,代码来源:test_operations.py
示例4: test_get_tree_with_implicit_local_path
def test_get_tree_with_implicit_local_path(self):
"""
Download entire tree without specifying a local path
"""
dirname = env.host_string.replace(':', '-')
try:
with hide('everything'):
get('tree')
leaves = filter(lambda x: x[0].startswith('/tree'), FILES.items())
for path, contents in leaves:
path = os.path.join(dirname, path[1:])
eq_contents(path, contents)
os.remove(path)
# Cleanup
finally:
if os.path.exists(dirname):
shutil.rmtree(dirname)
开发者ID:itsmeallan,项目名称:fabric,代码行数:17,代码来源:test_operations.py
注:本文中的server.FILES类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论