Files
entropy/libraries/tests/run
2009-10-11 00:58:13 +02:00

31 lines
802 B
Python
Executable File

#!/usr/bin/python2
# -*- coding: utf-8 -*-
import os
import sys
locale_dir = os.path.realpath(os.path.join(os.getcwd(), "i18n"))
os.environ['TEXTDOMAINDIR'] = locale_dir
import unittest
sys.path.insert(0,'../client')
sys.path.insert(0,'../../client')
sys.path.insert(0,'.')
sys.path.insert(0,'../')
# set unit testing mode
from entropy.const import etpSys
etpSys['unittest'] = True
from tests import db, client, server, misc, transceivers, tools, i18n, spm, qa
rc = 0
# Add to the list the module to test
mods = [db, client, server, misc, transceivers, tools, i18n, spm, qa]
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)