Files
entropy/libraries/tests/run
2009-09-20 18:38:47 +02:00

25 lines
612 B
Python
Executable File

#!/usr/bin/python2
import os
locale_dir = os.path.realpath(os.path.join(os.getcwd(), "i18n"))
os.environ['TEXTDOMAINDIR'] = locale_dir
import sys
import unittest
sys.path.insert(0,'.')
sys.path.insert(0,'../')
from tests import db, client, server, misc, transceivers, tools, i18n
rc = 0
# Add to the list the module to test
mods = [db, client, server, misc, transceivers, tools, i18n]
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)