From bbe17fd511b5890fb4554447e23d666f6c13b745 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 15 Jan 2014 02:42:39 +0000 Subject: Add support for zipfiles! --- test/libtest.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/libtest.py') diff --git a/test/libtest.py b/test/libtest.py index 0b45505..f052b6e 100644 --- a/test/libtest.py +++ b/test/libtest.py @@ -99,6 +99,7 @@ class TestSecureRemove(unittest.TestCase): ''' self.assertRaises(MAT.exceptions.UnableToRemoveFile, MAT.mat.secure_remove, '/NOTREMOVABLE') + class TestArchiveProcessing(test.MATTest): ''' Test archives processing ''' @@ -107,7 +108,7 @@ class TestArchiveProcessing(test.MATTest): ''' tarpath = os.path.join(self.tmpdir, "test.tar.bz2") tar = tarfile.open(tarpath, "w:bz2") - for clean,dirty in self.file_list: + for clean, dirty in self.file_list: tar.add(dirty) tar.add(clean) tar.close() @@ -121,7 +122,7 @@ class TestArchiveProcessing(test.MATTest): ''' tarpath = os.path.join(self.tmpdir, "test.tar") tar = tarfile.open(tarpath, "w") - for clean,dirty in self.file_list: + for clean, dirty in self.file_list: tar.add(dirty) tar.add(clean) tar.close() @@ -135,7 +136,7 @@ class TestArchiveProcessing(test.MATTest): ''' tarpath = os.path.join(self.tmpdir, "test.tar.gz") tar = tarfile.open(tarpath, "w") - for clean,dirty in self.file_list: + for clean, dirty in self.file_list: tar.add(dirty) tar.add(clean) tar.close() @@ -156,6 +157,7 @@ class TestArchiveProcessing(test.MATTest): unsupported_files = set(current_file.is_clean(list_unsupported=True)) self.assertEqual(unsupported_files, set(('mat.desktop', 'README.security', 'setup.py'))) + def get_tests(): ''' Returns every libtests''' suite = unittest.TestSuite() -- cgit v1.3