
from __future__ import absolute_import, division, print_function

import pytest


def skip_check(name, iface, item):
    if name in item.keywords and item.funcargs.get('backend') is not None:
        if not isinstance(item.funcargs['backend'], iface):
            pytest.skip("Backend does not support {0}".format(name))


from __future__ import absolute_import, division, print_function

import pytest


def skip_check(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
            ))

Include teh name of the backend in the error message
Include teh name of the backend in the error message

  
  from __future__ import absolute_import, division, print_function
  
  import pytest
  
  
  def skip_check(name, iface, item):
-     if name in item.keywords and item.funcargs.get('backend') is not None:
+     if name in item.keywords and "backend" in item.funcargs:
-         if not isinstance(item.funcargs['backend'], iface):
+         if not isinstance(item.funcargs["backend"], iface):
-             pytest.skip("Backend does not support {0}".format(name))
+             pytest.skip("{0} backend does not support {1}".format(
+                 item.funcargs["backend"], name
+             ))
  
Include teh name of the backend in the error message
## Code Before:

from __future__ import absolute_import, division, print_function

import pytest


def skip_check(name, iface, item):
    if name in item.keywords and item.funcargs.get('backend') is not None:
        if not isinstance(item.funcargs['backend'], iface):
            pytest.skip("Backend does not support {0}".format(name))

## Instruction:
Include teh name of the backend in the error message
## Code After:

from __future__ import absolute_import, division, print_function

import pytest


def skip_check(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
            ))
