third_party/python/pyasn1/test/codec/ber/suite.py
author Andrew Halberstadt <ahalberstadt@mozilla.com>
Tue, 23 May 2017 15:34:24 -0400
changeset 583185 38855fd0ec895956f7869adcd40bc0f22fa6c668
parent 229559 python/pyasn1/test/codec/ber/suite.py@0536f6db7f6684df46b470eb84eabeffb0b32326
permissions -rw-r--r--
Bug 1346025 - Move vendored python modules from /python to /third_party/python MozReview-Commit-ID: 2rJafmwysUY

from sys import path, version_info
from os.path import sep
path.insert(1, path[0]+sep+'ber')
import test_encoder, test_decoder
from pyasn1.error import PyAsn1Error
if version_info[0:2] < (2, 7) or \
   version_info[0:2] in ( (3, 0), (3, 1) ):
    try:
        import unittest2 as unittest
    except ImportError:
        import unittest
else:
    import unittest

suite = unittest.TestSuite()
loader = unittest.TestLoader()
for m in (test_encoder, test_decoder):
    suite.addTest(loader.loadTestsFromModule(m))

def runTests(): unittest.TextTestRunner(verbosity=2).run(suite)

if __name__ == '__main__': runTests()