Package pytils :: Package test
[hide private]
[frames] | no frames]

Source Code for Package pytils.test

 1  # -*- coding: utf-8 -*- 
 2  # License: GNU GPL2 
 3  # Author: Pythy <the.pythy@gmail.com> 
 4  """ 
 5  Unit tests for pytils 
 6  """ 
 7   
 8  __id__ = __revision__ = "$Id: __init__.py 11 2006-09-28 17:45:00Z the.pythy $" 
 9  __url__ = "$URL: https://pythy.googlecode.com/svn/trunk/pytils/pytils/test/__init__.py $" 
10  __all__ = ["test_numeral", "test_dt", "test_translit", "test_utils"] 
11   
12  import unittest 
13   
14 -def get_suite():
15 """Return TestSuite for all unit-test of PyTils""" 16 suite = unittest.TestSuite() 17 for module_name in __all__: 18 imported_module = __import__("pytils.test."+module_name, 19 globals(), 20 locals(), 21 ["pytils.test"]) 22 loader = unittest.defaultTestLoader 23 suite.addTest(loader.loadTestsFromModule(imported_module)) 24 25 return suite
26
27 -def run(verbosity=1):
28 """Run all unit-test of PyTils""" 29 suite = get_suite() 30 unittest.TextTestRunner(verbosity=verbosity).run(suite)
31 32 if __name__ == '__main__': 33 run(2) 34