From bf1d9618cfd88430a2fd8bd4fcba0c7dd61c3ffc Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 8 Mar 2013 14:49:25 +0000 Subject: Test that chunk artifacts are NOT compressed --- morphlib/bins_tests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'morphlib/bins_tests.py') diff --git a/morphlib/bins_tests.py b/morphlib/bins_tests.py index 3288207b..d7ed1656 100644 --- a/morphlib/bins_tests.py +++ b/morphlib/bins_tests.py @@ -1,4 +1,4 @@ -# Copyright (C) 2011-2012 Codethink Limited +# Copyright (C) 2011-2013 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -14,6 +14,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +import gzip import os import shutil import stat @@ -134,6 +135,11 @@ class ChunkTests(BinsTest): self.assertEqual([x for x, y in self.recursive_lstat(self.instdir)], ['.', 'lib', 'lib/libfoo.so']) + def test_does_not_compress_artifact(self): + self.create_chunk(['bin']) + with gzip.open(self.chunk_file) as f: + self.assertRaises(IOError, f.read) + class ExtractTests(unittest.TestCase): -- cgit v1.2.1