當前位置: 首頁>>代碼示例>>Python>>正文


Python server.FILES類代碼示例

本文整理匯總了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;未經允許,請勿轉載。