~ubuntu-branches/debian/sid/bzr-builddeb/sid

« back to all changes in this revision

Viewing changes to tests/test_util.py

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij, Jelmer Vernooij, Martin Packman
  • Date: 2011-10-01 21:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20111001212705-29f1lpwpsdb2dork
Tags: 2.7.9
[ Jelmer Vernooij ]
* Support .tar.xz Debian files rather than .tar.lzma.

[ Martin Packman ]
* Support non-ascii characters in changelog entry when determining
  commit message. LP: #853664

[ Jelmer Vernooij ]
* Use more complete control file during examples. Closes: #642818

Show diffs side-by-side

added added

removed removed

Lines of Context:
284
284
        self.assertEqual(tarball_name("package", Version("0.1"), None,
285
285
                    format='bz2'), "package_0.1.orig.tar.bz2")
286
286
        self.assertEqual(tarball_name("package", Version("0.1"), None,
287
 
                    format='lzma'), "package_0.1.orig.tar.lzma")
 
287
                    format='xz'), "package_0.1.orig.tar.xz")
288
288
        self.assertEqual(tarball_name("package", Version("0.1"), "la",
289
 
                    format='lzma'), "package_0.1.orig-la.tar.lzma")
 
289
                    format='xz'), "package_0.1.orig-la.tar.xz")
290
290
 
291
291
 
292
292
class SuiteToDistributionTests(TestCase):
883
883
                f = gzip.GzipFile(tar_path, "w")
884
884
            elif compression == "bz2":
885
885
                f = bz2.BZ2File(tar_path, "w")
886
 
            elif compression == "lzma":
 
886
            elif compression == "xz":
887
887
                import lzma
888
888
                f = lzma.LZMAFile(tar_path, "w")
889
889
            else:
915
915
            strip_components=1)
916
916
        self.assertEquals(os.listdir("target"), ["README"])
917
917
 
918
 
    def test_single_orig_tar_lzma(self):
 
918
    def test_single_orig_tar_xz(self):
919
919
        self.requireFeature(LzmaFeature)
920
 
        tar_path = self.create_tarball("package", "0.1", "lzma")
 
920
        tar_path = self.create_tarball("package", "0.1", "xz")
921
921
        os.mkdir("target")
922
922
        extract_orig_tarballs([(tar_path, None)], "target",
923
923
            strip_components=1)