summaryrefslogtreecommitdiff
path: root/baserockimport
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-05-18 14:20:46 +0100
committerBaserock Gerrit <gerrit@baserock.org>2015-05-19 19:31:31 +0000
commit8f705773cafe9811c98663f5ebe938f0c646ca8f (patch)
tree1ba321f6cc7f6d847330b9fdbb0686d216578af5 /baserockimport
parent459fd0ed302f152dae6ba7abf0ab7167e7257201 (diff)
downloadimport-8f705773cafe9811c98663f5ebe938f0c646ca8f.tar.gz
Add check script
We switch to unittest.main() here so that the exit code gets set by unittest, which in turn sets check's exit code Change-Id: If9ace26ba5373cb78192b30922ee1bd0ea91f36f
Diffstat (limited to 'baserockimport')
-rwxr-xr-xbaserockimport/exts/python_find_deps_tests.py8
-rwxr-xr-xbaserockimport/exts/python_lorry_tests.py8
2 files changed, 10 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)