diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-12-24 22:43:46 -0800 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-12-24 22:43:46 -0800 |
commit | 0865a8b81075bfe073aba56e03cc57c30bfffe00 (patch) | |
tree | f029d15b5d36d05bfad67c9aac157ffdb139a417 /tests/utils.py | |
parent | 348c80f2eba66b5c1b7f4c3a5ee8fc330895ae4e (diff) | |
parent | 2b3f94271209883aab4181ac5401c699c5c60b75 (diff) | |
download | cryptography-0865a8b81075bfe073aba56e03cc57c30bfffe00.tar.gz cryptography-0865a8b81075bfe073aba56e03cc57c30bfffe00.tar.bz2 cryptography-0865a8b81075bfe073aba56e03cc57c30bfffe00.zip |
Merge pull request #347 from alex/better-error-emssage
Better error emssage
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/utils.py b/tests/utils.py index 94f97d59..82021a5f 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -11,7 +11,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os.path +import os + +import pytest + + +def check_for_iface(name, iface, item): + if name in item.keywords and "backend" in item.funcargs: + if not isinstance(item.funcargs["backend"], iface): + pytest.skip("{0} backend does not support {1}".format( + item.funcargs["backend"], name + )) def load_vectors_from_file(filename, loader): |