1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 """
17 Unit tests for pytils
18 """
19
20 __id__ = __revision__ = "$Id: __init__.py 70 2007-02-19 03:42:32Z the.pythy $"
21 __url__ = "$URL: https://pythy.googlecode.com/svn/trunk/pytils/pytils/test/__init__.py $"
22 __all__ = ["test_numeral", "test_dt", "test_translit", "test_utils"]
23
24 import unittest
25
34
36 """Return TestSuite for all unit-test of PyTils"""
37 suite = unittest.TestSuite()
38 for module_name in __all__:
39 imported_module = __import__("pytils.test."+module_name,
40 globals(),
41 locals(),
42 ["pytils.test"])
43
44 loader = unittest.defaultTestLoader
45 suite.addTest(loader.loadTestsFromModule(imported_module))
46 suite.addTest(get_django_suite())
47
48 return suite
49
50
51 -def run(verbosity=1):
52 """Run all unit-test of PyTils"""
53 suite = get_suite()
54 unittest.TextTestRunner(verbosity=verbosity).run(suite)
55
56 if __name__ == '__main__':
57 run(2)
58