summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2016-03-27 19:08:48 +0200
committerjvoisin2016-03-27 19:08:48 +0200
commit368474eaaa6cce9d219ff1963ff31e521eca62e9 (patch)
treeaffd71b4f51861178545c44892c061c0e4e4b56f
parentcae9853318964813b60db05e71d431eb49366d34 (diff)
Move some testfiles around
The long-term goal is to use nose2 for testing
-rw-r--r--test/test.py8
-rw-r--r--test/test_cli.py (renamed from test/clitest.py)4
-rw-r--r--test/test_lib.py (renamed from test/libtest.py)4
3 files changed, 8 insertions, 8 deletions
diff --git a/test/test.py b/test/test.py
index 58e7ec7..818909e 100644
--- a/test/test.py
+++ b/test/test.py
@@ -85,11 +85,11 @@ def run_all_tests():
85 the one used to spawn the `mat` process, and the one for Python import) 85 the one used to spawn the `mat` process, and the one for Python import)
86 in the main function. 86 in the main function.
87 """ 87 """
88 import clitest 88 import test_cli
89 import libtest 89 import test_lib
90 suite = unittest.TestSuite() 90 suite = unittest.TestSuite()
91 suite.addTests(clitest.get_tests()) 91 suite.addTests(test_cli.get_tests())
92 suite.addTests(libtest.get_tests()) 92 suite.addTests(test_lib.get_tests())
93 93
94 return unittest.TextTestRunner(verbosity=VERBOSITY).run(suite).wasSuccessful() 94 return unittest.TextTestRunner(verbosity=VERBOSITY).run(suite).wasSuccessful()
95 95
diff --git a/test/clitest.py b/test/test_cli.py
index 884655f..9f682b9 100644
--- a/test/clitest.py
+++ b/test/test_cli.py
@@ -131,13 +131,13 @@ class TestUnsupported(test.MATTest):
131 """ 131 """
132 tarpath = os.path.join(self.tmpdir, "test.tar.bz2") 132 tarpath = os.path.join(self.tmpdir, "test.tar.bz2")
133 tar = tarfile.open(tarpath, "w") 133 tar = tarfile.open(tarpath, "w")
134 for f in ('libtest.py', 'test.py', 'clitest.py'): 134 for f in ('test_lib.py', 'test.py', 'test_cli.py'):
135 tar.add(f, f) 135 tar.add(f, f)
136 tar.close() 136 tar.close()
137 proc = subprocess.Popen(['mat', tarpath], stdout=subprocess.PIPE) 137 proc = subprocess.Popen(['mat', tarpath], stdout=subprocess.PIPE)
138 stdout, _ = proc.communicate() 138 stdout, _ = proc.communicate()
139 self.assertTrue('It contains unsupported filetypes:' 139 self.assertTrue('It contains unsupported filetypes:'
140 '\n- libtest.py\n- test.py\n- clitest.py\n' 140 '\n- test_lib.py\n- test.py\n- test_cli.py\n'
141 in str(stdout)) 141 in str(stdout))
142 142
143 143
diff --git a/test/libtest.py b/test/test_lib.py
index 98cb4ea..33b3a02 100644
--- a/test/libtest.py
+++ b/test/test_lib.py
@@ -175,12 +175,12 @@ class TestArchiveProcessing(test.MATTest):
175 """ 175 """
176 tarpath = os.path.join(self.tmpdir, "test.tar.bz2") 176 tarpath = os.path.join(self.tmpdir, "test.tar.bz2")
177 tar = tarfile.open(tarpath, "w") 177 tar = tarfile.open(tarpath, "w")
178 for f in ('libtest.py', 'test.py', 'clitest.py'): 178 for f in ('test_lib.py', 'test.py', 'test_cli.py'):
179 tar.add(f, f) 179 tar.add(f, f)
180 tar.close() 180 tar.close()
181 current_file = libmat.mat.create_class_file(tarpath, False, add2archive=False) 181 current_file = libmat.mat.create_class_file(tarpath, False, add2archive=False)
182 unsupported_files = set(current_file.is_clean(list_unsupported=True)) 182 unsupported_files = set(current_file.is_clean(list_unsupported=True))
183 self.assertEqual(unsupported_files, {'libtest.py', 'test.py', 'clitest.py'}) 183 self.assertEqual(unsupported_files, {'test_lib.py', 'test.py', 'test_cli.py'})
184 184
185 def test_archive_unwritable_content(self): 185 def test_archive_unwritable_content(self):
186 path = os.path.join(self.tmpdir, './unwritable_content.zip') 186 path = os.path.join(self.tmpdir, './unwritable_content.zip')