mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
backend support check now lists which backend caused the skip
This commit is contained in:
parent
adbea0d945
commit
f03334e25c
2 changed files with 4 additions and 2 deletions
|
|
@ -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():
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue