From 845d3538fabb8adfd003624e8f07aca2608c8e6a Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 12 Aug 2010 22:40:16 +0200 Subject: [PATCH] [tests] add initial unit tests --- tests/__init__.py | 0 tests/run | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 tests/__init__.py create mode 100755 tests/run diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/run b/tests/run new file mode 100755 index 0000000..6726dbc --- /dev/null +++ b/tests/run @@ -0,0 +1,23 @@ +#!/usr/bin/python2 +# -*- coding: utf-8 -*- + +import sys + +import unittest +sys.path.insert(0,'.') +sys.path.insert(0,'..') + +from tests import version, utils +rc = 0 + +# Add to the list the module to test +mods = [version, utils] + +tests = [] +for mod in mods: + tests.append(unittest.TestLoader().loadTestsFromModule(mod)) + +result = unittest.TextTestRunner(verbosity = 1).run(unittest.TestSuite(tests)) +if result.errors: + rc = 1 +raise SystemExit(rc)