test_archive_8.py 378 B

1234567891011
  1. def test_extract_change_topdir_already_correct(self):
  2. src = os.path.join(self.tmp, "src")
  3. os.mkdir(src)
  4. a_dir = os.path.join(src, "a")
  5. os.mkdir(a_dir)
  6. tar_gz = qibuild.archive.zip_unix(a_dir)
  7. dest = os.path.join(self.tmp, "dest")
  8. qibuild.archive.extract(tar_gz, dest, topdir="a")
  9. ls_r = qibuild.sh.ls_r(dest)
  10. self.assertEquals(ls_r, ["a/"])