Ejemplo n.º 1
0
 def prep_link_from_arguments(self, args, uuid_found=True):
     try:
         link = arv_put.prep_project_link(arv_put.parse_arguments(args),
                                          self.stderr,
                                          lambda uuid: uuid_found)
     finally:
         self.stderr.seek(0)
     return link
Ejemplo n.º 2
0
 def test_cache_names_ignore_irrelevant_arguments(self):
     # Workaround: parse_arguments bails on --filename with a directory.
     path1 = self.cache_path_from_arglist(['/tmp'])
     args = arv_put.parse_arguments(['/tmp'])
     args.filename = 'tmp'
     path2 = arv_put.ResumeCache.make_path(args)
     self.assertEqual(path1, path2,
                      "cache path considered --filename for directory")
     self.assertEqual(
         self.cache_path_from_arglist(['-']),
         self.cache_path_from_arglist(['-', '--max-manifest-depth', '1']),
         "cache path considered --max-manifest-depth for file")
Ejemplo n.º 3
0
 def test_cache_names_ignore_irrelevant_arguments(self):
     # Workaround: parse_arguments bails on --filename with a directory.
     path1 = self.cache_path_from_arglist(['/tmp'])
     args = arv_put.parse_arguments(['/tmp'])
     args.filename = 'tmp'
     path2 = arv_put.ResumeCache.make_path(args)
     self.assertEqual(path1, path2,
                      "cache path considered --filename for directory")
     self.assertEqual(
         self.cache_path_from_arglist(['-']),
         self.cache_path_from_arglist(['-', '--max-manifest-depth', '1']),
         "cache path considered --max-manifest-depth for file")
Ejemplo n.º 4
0
 def cache_path_from_arglist(self, arglist):
     return arv_put.ResumeCache.make_path(arv_put.parse_arguments(arglist))
Ejemplo n.º 5
0
 def cache_path_from_arglist(self, arglist):
     return arv_put.ResumeCache.make_path(arv_put.parse_arguments(arglist))