Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/l/i/lib-rar-python-HEAD/librar/test_archive.py   lib-rar-python(Download)
 
    a = archive.Archive(rar,base)
    a.add_file(frel)
 
    self.assertEqual(a.run(),0)
 
    a = archive.Archive(rar,base)
    a.add_file(frel)
    a.add_file(frel2)
 
    self.assertEqual(file_helper.file_exists(fabs),True)
 
    a.add_file(frel) # must add relative paths
 
    # run and check if rar archive exists:
    a = archive.Archive(aname,base)
    file_helper.create_file(opj(self.tempdir,"testfile")) # empty file is ok
    a.add_file(opj("testfile"))
    syscode = a.run()
    # should fail, because the target dir does not exist: