diff options
| author | Christoph Berg <myon@debian.org> | 2020-03-31 17:57:16 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2020-03-31 17:57:16 +0200 |
| commit | 2ba1bab937ec201b31cf786c93bbf0539a8e047a (patch) | |
| tree | b06e844fe4026d0c81e92acabe4add6e9438cf71 /tests/test_drivers.py | |
| parent | 721c02f52e5177a640c892c7958012dba3b9e520 (diff) | |
| parent | c2bdd8f8d96bf5329672163cc0905a22589d26d3 (diff) | |
Update upstream source from tag 'upstream/20200227+py3+20200213'
Update to upstream version '20200227+py3+20200213'
with Debian dir c0f9099523ece3eab9e2cb891c746aea7e83cefc
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) |
