blob: ba8aaf9ae91cb4b17470dec1b07dd31128af83ca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import sys
import unittest
from chirp import directory
from tests import load_tests
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
directory.safe_import_drivers()
adapter = TestSuiteAdapter(locals())
load_tests(adapter, None, None, suite=adapter)
|