aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-24 22:43:46 -0800
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-24 22:43:46 -0800
commit0865a8b81075bfe073aba56e03cc57c30bfffe00 (patch)
treef029d15b5d36d05bfad67c9aac157ffdb139a417 /tests/utils.py
parent348c80f2eba66b5c1b7f4c3a5ee8fc330895ae4e (diff)
parent2b3f94271209883aab4181ac5401c699c5c60b75 (diff)
downloadcryptography-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.py12
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):