Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
 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)
Пример #6
0
 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)
Пример #7
0
 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)