Beispiel #1
0
    def test_compress_decompress_lzma(self):
        with NamedTemporaryFile() as file:
            with compress(file.name + ".xz") as compressed_file:
                self.create_file(compressed_file)

            with decompress(file.name + ".xz") as uncompressed_file:
                assert self.check_file(uncompressed_file)
Beispiel #2
0
    def test_compress_decompress_lzma(self):
        with TemporaryDirectory() as tdir:
            tfile = os.path.join(tdir, 'testfile')
            with compress(tfile + ".xz") as compressed_file:
                self.create_file(compressed_file)

            with decompress(tfile + ".xz") as uncompressed_file:
                assert self.check_file(uncompressed_file)