diff options
| author | Matthew Poletiek <matthew.poletiek@gmail.com> | 2020-12-08 21:03:16 -0600 |
|---|---|---|
| committer | Matthew Poletiek <matthew.poletiek@gmail.com> | 2020-12-08 21:03:16 -0600 |
| commit | e99416456afd4aa8bde42016826f9a345291cbf3 (patch) | |
| tree | a7a95639cd1cb5dbe2d91a2ca8e8defafac4296d /tests/test_drivers.py | |
| parent | 194cf4e5e0b6a2811103a9b739a72b9afe2b886c (diff) | |
| download | chirp-e99416456afd4aa8bde42016826f9a345291cbf3.tar.gz chirp-e99416456afd4aa8bde42016826f9a345291cbf3.tar.xz | |
Initial Commit
Diffstat (limited to 'tests/test_drivers.py')
| -rw-r--r-- | tests/test_drivers.py | 24 |
1 files changed, 24 insertions, 0 deletions
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) |
