def test_archive_subdir(self):
        tar_archive = os.path.join(integration.TMP, 'test_archive.tar.gz')
        self.assertTrue(
            self.run_function(
                'git.archive',
                [os.path.join(self.repo, 'qux'), tar_archive],
                prefix='foo/'
            )
        )
        self.assertTrue(tarfile.is_tarfile(tar_archive))
        with closing(tarfile.open(tar_archive, 'r')) as tar_obj:
            self.assertEqual(
                tar_obj.getnames(),
                ['foo', 'foo/bar', 'foo/baz', 'foo/foo']
            )
        os.unlink(tar_archive)
Test git.archive on a subdir, giving only a partial copy of the repo in
dataset/ETHPy150Open saltstack/salt/tests/integration/modules/git.py/GitModuleTest.test_archive_subdir