From c2bdd8f8d96bf5329672163cc0905a22589d26d3 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Tue, 31 Mar 2020 17:57:07 +0200 Subject: New upstream version 20200227+py3+20200213 --- tests/test_drivers.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/test_drivers.py (limited to 'tests/test_drivers.py') diff --git a/tests/test_drivers.py b/tests/test_drivers.py new file mode 100644 index 0000000..ba8aaf9 --- /dev/null +++ b/tests/test_drivers.py @@ -0,0 +1,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) -- cgit v1.2.3