suite.py 626 B

1234567891011121314151617181920212223242526
  1. from sys import path, version_info
  2. from os.path import sep
  3. path.insert(1, path[0]+sep+'type')
  4. import type.suite
  5. path.insert(1, path[0]+sep+'codec')
  6. import codec.suite
  7. from pyasn1.error import PyAsn1Error
  8. if version_info[0:2] < (2, 7) or \
  9. version_info[0:2] in ( (3, 0), (3, 1) ):
  10. try:
  11. import unittest2 as unittest
  12. except ImportError:
  13. import unittest
  14. else:
  15. import unittest
  16. suite = unittest.TestSuite()
  17. for m in (
  18. type.suite,
  19. codec.suite
  20. ):
  21. suite.addTest(getattr(m, 'suite'))
  22. def runTests(): unittest.TextTestRunner(verbosity=2).run(suite)
  23. if __name__ == '__main__': runTests()