testall.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/usr/bin/env python
  2. #
  3. # Copyright (C) 2009-2011 Wander Lairson Costa
  4. #
  5. # The following terms apply to all files associated
  6. # with the software unless explicitly disclaimed in individual files.
  7. #
  8. # The authors hereby grant permission to use, copy, modify, distribute,
  9. # and license this software and its documentation for any purpose, provided
  10. # that existing copyright notices are retained in all copies and that this
  11. # notice is included verbatim in any distributions. No written agreement,
  12. # license, or royalty fee is required for any of the authorized uses.
  13. # Modifications to this software may be copyrighted by their authors
  14. # and need not follow the licensing terms described here, provided that
  15. # the new terms are clearly indicated on the first page of each file where
  16. # they apply.
  17. #
  18. # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
  19. # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  20. # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
  21. # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
  22. # POSSIBILITY OF SUCH DAMAGE.
  23. #
  24. # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
  25. # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
  26. # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
  27. # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
  28. # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
  29. # MODIFICATIONS.
  30. import utils
  31. import unittest
  32. import glob
  33. import os.path
  34. if __name__ == '__main__':
  35. suite = unittest.TestSuite()
  36. for i in glob.glob('*.py'):
  37. m = __import__(os.path.splitext(i)[0])
  38. if hasattr(m, 'get_suite'):
  39. suite.addTest(m.get_suite())
  40. utils.run_tests(suite)