summaryrefslogtreecommitdiff
path: root/test/test_lib.py
diff options
context:
space:
mode:
authorjvoisin2016-08-29 22:12:40 +0200
committerjvoisin2016-08-29 22:12:40 +0200
commit64b667be5d6b36d17839482593ccf2207af14ac9 (patch)
tree8ab14777fc5d6a8d9793c2a460ae9e4ea14c2909 /test/test_lib.py
parenta3c289dea1ceebcc2e624d002ab31deb851a7e3a (diff)
Python3, now with less features
I want to release a new version ASAP, so lets ditch some features for now.
Diffstat (limited to 'test/test_lib.py')
-rw-r--r--test/test_lib.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test_lib.py b/test/test_lib.py
index 33b3a02..8d3d766 100644
--- a/test/test_lib.py
+++ b/test/test_lib.py
@@ -72,6 +72,7 @@ class TestisCleanlib(test.MATTest):
72 """test is_clean on dirty files""" 72 """test is_clean on dirty files"""
73 for _, dirty in self.file_list: 73 for _, dirty in self.file_list:
74 current_file = libmat.mat.create_class_file(dirty, False, add2archive=True) 74 current_file = libmat.mat.create_class_file(dirty, False, add2archive=True)
75 print(current_file.filename)
75 self.assertFalse(current_file.is_clean()) 76 self.assertFalse(current_file.is_clean())
76 77
77 def test_clean(self): 78 def test_clean(self):
@@ -131,6 +132,7 @@ class TestArchiveProcessing(test.MATTest):
131 def test_remove_bz2(self): 132 def test_remove_bz2(self):
132 """ Test MAT's ability to process .tar.bz2 133 """ Test MAT's ability to process .tar.bz2
133 """ 134 """
135 return
134 tarpath = os.path.join(self.tmpdir, "test.tar.bz2") 136 tarpath = os.path.join(self.tmpdir, "test.tar.bz2")
135 tar = tarfile.open(tarpath, "w:bz2") 137 tar = tarfile.open(tarpath, "w:bz2")
136 for clean, dirty in self.file_list: 138 for clean, dirty in self.file_list:
@@ -145,6 +147,7 @@ class TestArchiveProcessing(test.MATTest):
145 def test_remove_tar(self): 147 def test_remove_tar(self):
146 """ Test MAT on tar files 148 """ Test MAT on tar files
147 """ 149 """
150 return
148 tarpath = os.path.join(self.tmpdir, "test.tar") 151 tarpath = os.path.join(self.tmpdir, "test.tar")
149 tar = tarfile.open(tarpath, "w") 152 tar = tarfile.open(tarpath, "w")
150 for clean, dirty in self.file_list: 153 for clean, dirty in self.file_list:
@@ -159,6 +162,7 @@ class TestArchiveProcessing(test.MATTest):
159 def test_remove_gz(self): 162 def test_remove_gz(self):
160 """ Test MAT on tar.gz files 163 """ Test MAT on tar.gz files
161 """ 164 """
165 return
162 tarpath = os.path.join(self.tmpdir, "test.tar.gz") 166 tarpath = os.path.join(self.tmpdir, "test.tar.gz")
163 tar = tarfile.open(tarpath, "w") 167 tar = tarfile.open(tarpath, "w")
164 for clean, dirty in self.file_list: 168 for clean, dirty in self.file_list:
@@ -173,6 +177,7 @@ class TestArchiveProcessing(test.MATTest):
173 def test_get_unsupported(self): 177 def test_get_unsupported(self):
174 """ Test the get_unsupported feature, used by the GUI 178 """ Test the get_unsupported feature, used by the GUI
175 """ 179 """
180 return
176 tarpath = os.path.join(self.tmpdir, "test.tar.bz2") 181 tarpath = os.path.join(self.tmpdir, "test.tar.bz2")
177 tar = tarfile.open(tarpath, "w") 182 tar = tarfile.open(tarpath, "w")
178 for f in ('test_lib.py', 'test.py', 'test_cli.py'): 183 for f in ('test_lib.py', 'test.py', 'test_cli.py'):
@@ -183,6 +188,7 @@ class TestArchiveProcessing(test.MATTest):
183 self.assertEqual(unsupported_files, {'test_lib.py', 'test.py', 'test_cli.py'}) 188 self.assertEqual(unsupported_files, {'test_lib.py', 'test.py', 'test_cli.py'})
184 189
185 def test_archive_unwritable_content(self): 190 def test_archive_unwritable_content(self):
191 return
186 path = os.path.join(self.tmpdir, './unwritable_content.zip') 192 path = os.path.join(self.tmpdir, './unwritable_content.zip')
187 shutil.copy2('./unwritable_content.zip', self.tmpdir) 193 shutil.copy2('./unwritable_content.zip', self.tmpdir)
188 current_file = libmat.mat.create_class_file(path, False, add2archive=False) 194 current_file = libmat.mat.create_class_file(path, False, add2archive=False)
@@ -199,5 +205,5 @@ def get_tests():
199 suite.addTest(unittest.makeSuite(TestisCleanlib)) 205 suite.addTest(unittest.makeSuite(TestisCleanlib))
200 suite.addTest(unittest.makeSuite(TestFileAttributes)) 206 suite.addTest(unittest.makeSuite(TestFileAttributes))
201 suite.addTest(unittest.makeSuite(TestSecureRemove)) 207 suite.addTest(unittest.makeSuite(TestSecureRemove))
202 suite.addTest(unittest.makeSuite(TestArchiveProcessing)) 208 #suite.addTest(unittest.makeSuite(TestArchiveProcessing))
203 return suite 209 return suite