~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_export.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-14 11:50:13 UTC
  • mto: This revision was merged to the branch mainline in revision 5724.
  • Revision ID: jelmer@samba.org-20110314115013-o9vwm8chuff6t8e1
SupportĀ tar.lzma.

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
        tf = tarfile.open(fileobj=lzma.LZMAFile('target.tar.xz'))
156
156
        self.assertEquals(["target/a"], tf.getnames())
157
157
 
 
158
    def test_lzma(self):
 
159
        wt = self.make_branch_and_tree('.')
 
160
        self.build_tree(['a'])
 
161
        wt.add(["a"])
 
162
        wt.commit("1")
 
163
        try:
 
164
            export.export(wt, 'target.tar.lzma', format="tlzma")
 
165
        except errors.DependencyNotPresent:
 
166
            raise tests.TestSkipped("lzma module not available")
 
167
        import lzma
 
168
        tf = tarfile.open(fileobj=lzma.LZMAFile('target.tar.lzma'))
 
169
        self.assertEquals(["target/a"], tf.getnames())
 
170
 
158
171
    def test_tgz(self):
159
172
        wt = self.make_branch_and_tree('.')
160
173
        self.build_tree(['a'])