Commit 368474ea authored by jvoisin's avatar jvoisin

Move some testfiles around

The long-term goal is to use nose2 for testing
parent cae98533
......@@ -85,11 +85,11 @@ def run_all_tests():
the one used to spawn the `mat` process, and the one for Python import)
in the main function.
"""
import clitest
import libtest
import test_cli
import test_lib
suite = unittest.TestSuite()
suite.addTests(clitest.get_tests())
suite.addTests(libtest.get_tests())
suite.addTests(test_cli.get_tests())
suite.addTests(test_lib.get_tests())
return unittest.TextTestRunner(verbosity=VERBOSITY).run(suite).wasSuccessful()
......
......@@ -131,13 +131,13 @@ class TestUnsupported(test.MATTest):
"""
tarpath = os.path.join(self.tmpdir, "test.tar.bz2")
tar = tarfile.open(tarpath, "w")
for f in ('libtest.py', 'test.py', 'clitest.py'):
for f in ('test_lib.py', 'test.py', 'test_cli.py'):
tar.add(f, f)
tar.close()
proc = subprocess.Popen(['mat', tarpath], stdout=subprocess.PIPE)
stdout, _ = proc.communicate()
self.assertTrue('It contains unsupported filetypes:'
'\n- libtest.py\n- test.py\n- clitest.py\n'
'\n- test_lib.py\n- test.py\n- test_cli.py\n'
in str(stdout))
......
......@@ -175,12 +175,12 @@ class TestArchiveProcessing(test.MATTest):
"""
tarpath = os.path.join(self.tmpdir, "test.tar.bz2")
tar = tarfile.open(tarpath, "w")
for f in ('libtest.py', 'test.py', 'clitest.py'):
for f in ('test_lib.py', 'test.py', 'test_cli.py'):
tar.add(f, f)
tar.close()
current_file = libmat.mat.create_class_file(tarpath, False, add2archive=False)
unsupported_files = set(current_file.is_clean(list_unsupported=True))
self.assertEqual(unsupported_files, {'libtest.py', 'test.py', 'clitest.py'})
self.assertEqual(unsupported_files, {'test_lib.py', 'test.py', 'test_cli.py'})
def test_archive_unwritable_content(self):
path = os.path.join(self.tmpdir, './unwritable_content.zip')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment