From 5e65094084c75a9372f529a3387b072a84bf254a Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 10 Jan 2014 22:00:37 +0000 Subject: Add tar.gz files to the testsuite --- test/libtest.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/libtest.py b/test/libtest.py index 452ed57..0b45505 100644 --- a/test/libtest.py +++ b/test/libtest.py @@ -130,6 +130,20 @@ class TestArchiveProcessing(test.MATTest): current_file = MAT.mat.create_class_file(tarpath, False, add2archive=False) self.assertTrue(current_file.is_clean()) + def test_remove_gz(self): + ''' Test MAT on tar.gz files + ''' + tarpath = os.path.join(self.tmpdir, "test.tar.gz") + tar = tarfile.open(tarpath, "w") + for clean,dirty in self.file_list: + tar.add(dirty) + tar.add(clean) + tar.close() + current_file = MAT.mat.create_class_file(tarpath, False, add2archive=False) + current_file.remove_all() + current_file = MAT.mat.create_class_file(tarpath, False, add2archive=False) + self.assertTrue(current_file.is_clean()) + def test_get_unsupported(self): ''' Test the get_unsupported feature, used by the GUI ''' -- cgit v1.3