2019-02-13 16:53:28 -08:00
|
|
|
from chirp import directory
|
|
|
|
|
from tests import load_tests
|
|
|
|
|
|
2023-07-02 14:17:17 -07:00
|
|
|
__builtins__['_'] = lambda s: s
|
|
|
|
|
|
2019-02-13 16:53:28 -08:00
|
|
|
|
|
|
|
|
class TestSuiteAdapter(object):
|
|
|
|
|
"""Adapter for pytest since it doesn't support the loadTests() protocol"""
|
|
|
|
|
|
|
|
|
|
def __init__(self, locals):
|
|
|
|
|
self.locals = locals
|
|
|
|
|
|
|
|
|
|
def loadTestsFromTestCase(self, test_cls):
|
|
|
|
|
self.locals[test_cls.__name__] = test_cls
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def addTests(tests):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
2022-11-23 16:18:51 -08:00
|
|
|
directory.import_drivers()
|
2019-02-13 16:53:28 -08:00
|
|
|
adapter = TestSuiteAdapter(locals())
|
|
|
|
|
load_tests(adapter, None, None, suite=adapter)
|