def test_guess_comp_type_auto_bzip2(self):
     subject = 'pristine-tar data for source_1.2-3.orig.tar.bz2'
     repo = MockGitRepository(with_branch=True, subject=subject)
     guessed = buildpackage.guess_comp_type(
         repo, 'auto', self.cp, self.tmpdir)
     self.assertEqual("bzip2", guessed)
 def test_guess_comp_type_lzma(self):
     repo = MockGitRepository(with_branch=False)
     guessed = buildpackage.guess_comp_type(
         repo, 'lzma', self.cp, None)
     self.assertEqual("lzma", guessed)
 def test_guess_comp_type_no_pristine_tar_no_orig(self):
     repo = MockGitRepository(with_branch=False)
     guessed = buildpackage.guess_comp_type(
         repo, 'auto', self.cp, self.tmpdir)
     self.assertEqual('gzip', guessed)
 def test_guess_comp_type_no_pristine_tar_with_orig(self):
     open(os.path.join(self.tmpdir, 'source_1.2.orig.tar.bz2'), "w").close()
     repo = MockGitRepository(with_branch=False)
     guessed = buildpackage.guess_comp_type(
         repo, 'auto', self.cp, self.tmpdir)
     self.assertEqual('bzip2', guessed)
 def test_guess_comp_type_bz2(self):
     repo = MockGitRepository(with_branch=False)
     guessed = buildpackage.guess_comp_type(repo, 'bz2', self.cp, None)
     self.assertEqual("bzip2", guessed)
 def test_guess_comp_type_auto_bzip2(self):
     subject = 'pristine-tar data for source_1.2-3.orig.tar.bz2'
     repo = MockGitRepository(with_branch=True, subject=subject)
     guessed = buildpackage.guess_comp_type(repo, 'auto', self.cp,
                                            str(self.tmpdir))
     self.assertEqual("bzip2", guessed)
 def test_guess_comp_type_no_pristine_tar_with_orig(self):
     open(self.tmpdir.join('source_1.2.orig.tar.bz2'), "w").close()
     repo = MockGitRepository(with_branch=False)
     guessed = buildpackage.guess_comp_type(repo, 'auto', self.cp,
                                            str(self.tmpdir))
     self.assertEqual('bzip2', guessed)
 def test_guess_comp_type_no_pristine_tar_no_orig(self):
     repo = MockGitRepository(with_branch=False)
     guessed = buildpackage.guess_comp_type(repo, 'auto', self.cp,
                                            str(self.tmpdir))
     self.assertEqual('gzip', guessed)
Exemple #9
0
 def test_guess_comp_type_gz(self):
     repo = MockGitRepository(with_branch=False)
     guessed = buildpackage.guess_comp_type(repo, 'gz', self.source, None)
     self.assertEqual("gzip", guessed)