aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-02 23:16:14 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-03 11:39:19 -0600
commitf03334e25c3c31094015d1421feef7bcec9a9c1f (patch)
tree2d707660ae5168e4fe4316aa5e8c39fe90e40d3d
parentadbea0d9456dd9261ef59c3c0f2e3466a3937686 (diff)
downloadcryptography-f03334e25c3c31094015d1421feef7bcec9a9c1f.tar.gz
cryptography-f03334e25c3c31094015d1421feef7bcec9a9c1f.tar.bz2
cryptography-f03334e25c3c31094015d1421feef7bcec9a9c1f.zip
backend support check now lists which backend caused the skip
-rw-r--r--tests/test_utils.py2
-rw-r--r--tests/utils.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index c640367e..e3e53d63 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -50,7 +50,7 @@ def test_check_backend_support_skip():
funcargs={"backend": True})
with pytest.raises(pytest.skip.Exception) as exc_info:
check_backend_support(item)
- assert exc_info.value.args[0] == "Nope"
+ assert exc_info.value.args[0] == "Nope (True)"
def test_check_backend_support_no_skip():
diff --git a/tests/utils.py b/tests/utils.py
index beb2ca5d..693a0c8f 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -28,7 +28,9 @@ def check_backend_support(item):
supported = item.keywords.get("supported")
if supported and "backend" in item.funcargs:
if not supported.kwargs["only_if"](item.funcargs["backend"]):
- pytest.skip(supported.kwargs["skip_message"])
+ pytest.skip("{0} ({1})".format(
+ supported.kwargs["skip_message"], item.funcargs["backend"]
+ ))
elif supported:
raise ValueError("This mark is only available on methods that take a "
"backend")