summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbaserockimport/exts/python_find_deps_tests.py8
-rwxr-xr-xbaserockimport/exts/python_lorry_tests.py8
-rwxr-xr-xcheck27
3 files changed, 37 insertions, 6 deletions
diff --git a/baserockimport/exts/python_find_deps_tests.py b/baserockimport/exts/python_find_deps_tests.py
index f7fc2dd..68af034 100755
--- a/baserockimport/exts/python_find_deps_tests.py
+++ b/baserockimport/exts/python_find_deps_tests.py
@@ -1,5 +1,7 @@
#!/usr/bin/env python
-# Copyright (C) 2014 Codethink Limited
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2014,2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,6 +16,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
import unittest
import random
@@ -358,5 +361,4 @@ class ConflictDetectionTests(unittest.TestCase):
if __name__ == '__main__':
- suite = unittest.TestLoader().loadTestsFromTestCase(ConflictDetectionTests)
- unittest.TextTestRunner(verbosity=2).run(suite)
+ unittest.main(verbosity=2)
diff --git a/baserockimport/exts/python_lorry_tests.py b/baserockimport/exts/python_lorry_tests.py
index be4bcac..f57be6d 100755
--- a/baserockimport/exts/python_lorry_tests.py
+++ b/baserockimport/exts/python_lorry_tests.py
@@ -1,5 +1,7 @@
#!/usr/bin/env python
-# Copyright (C) 2014 Codethink Limited
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2014,2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,6 +16,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
import imp
python_lorry = imp.load_source('python_lorry', 'python.to_lorry')
@@ -71,5 +74,4 @@ class Tests(unittest.TestCase):
if __name__ == '__main__':
- suite = unittest.TestLoader().loadTestsFromTestCase(Tests)
- unittest.TextTestRunner(verbosity=2).run(suite)
+ unittest.main(verbosity=2)
diff --git a/check b/check
new file mode 100755
index 0000000..ecad387
--- /dev/null
+++ b/check
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Run test suite for import.
+#
+# Copyright © 2015 Codethink Limited
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+EXTDIR=baserockimport/exts
+
+cd $EXTDIR
+echo Running python.find_lorry tests
+./python_lorry_tests.py > /dev/null
+echo Running python.find_deps tests
+./python_find_deps_tests.py > /dev/null