diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-10-25 12:22:10 -0700 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-10-25 12:22:10 -0700 |
commit | 902d8cfd58de395748d71f449944faa9dbac8725 (patch) | |
tree | 681d1b5a68a6e89efc8287685592b094f634ff9e /tests/utils.py | |
parent | 56f1a0ae53773285db53c367e697e0a015eed5f1 (diff) | |
download | cryptography-902d8cfd58de395748d71f449944faa9dbac8725.tar.gz cryptography-902d8cfd58de395748d71f449944faa9dbac8725.tar.bz2 cryptography-902d8cfd58de395748d71f449944faa9dbac8725.zip |
move skip_if_empty to separate function for test coverage
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py index 7b462c2d..acc6c141 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -53,6 +53,15 @@ def select_backends(names, backend_list): ) +def skip_if_empty(backend_list, required_interfaces): + if not backend_list: + pytest.skip( + "No backends provided supply the interface: {0}".format( + ", ".join(iface.__name__ for iface in required_interfaces) + ) + ) + + def check_backend_support(item): supported = item.keywords.get("supported") if supported and "backend" in item.funcargs: |