code: def pytest_runtest_makereport(item, call):
      outcome = yield
      rep = outcome.get_result()
      evalxfail = getattr(item, "_evalxfail", None)
      # unitttest special case, see setting of _unexpectedsuccess
      if hasattr(item, "_unexpectedsuccess") and rep.when == "call":
          from _pytest.compat import (
              _is_unittest_unexpected_success_a_failure,
          )
  
          if item._unexpectedsuccess:
              rep.longrepr = "Unexpected success: {}".format(
                  item._unexpectedsuccess
              )
          else:
              rep.longrepr = "Unexpected success"
          if _is_unittest_unexpected_success_a_failure():
              rep.outcome = "failed"
          else:
              rep.outcome = "passed"
              rep.wasxfail = rep.longrepr
      elif item.config.option.runxfail:
          pass  # don't interefere
      elif call.excinfo and call.excinfo.errisinstance(xfail.Exception):
          rep.wasxfail = "reason: " + call.excinfo.value.msg
          rep.outcome = "skipped"
      elif (
          evalxfail
          and not rep.skipped
          and evalxfail.wasvalid()
          and evalxfail.istrue()
      ):
          if call.excinfo:
              if evalxfail.invalidraise(call.excinfo.value):
                  rep.outcome = "failed"
              else:
                  rep.outcome = "skipped"
                  rep.wasxfail = evalxfail.getexplanation()
          elif call.when == "call":
              strict_default = item.config.getini("xfail_strict")
              is_strict_xfail = evalxfail.get("strict", strict_default)
              explanation = evalxfail.getexplanation()
              if is_strict_xfail:
                  rep.outcome = "failed"
                  rep.longrepr = "[XPASS(strict)] {}".format(
                      explanation
                  )
              else:
                  rep.outcome = "passed"
                  rep.wasxfail = explanation
      elif (
          getattr(item, "_skipped_by_mark", False)
          and rep.skipped
          and type(rep.longrepr) is tuple
      ):
          # skipped by mark.skipif; change the location of the failure
          # to point to the item definition, otherwise it will display
          # the location of where the skip exception was raised within pytest
          filename, line, reason = rep.longrepr
          filename, line = item.location[:2]
          rep.longrepr = filename, line, reason
  
file_path: catboost/contrib/python/pytest/py2/_pytest/skipping.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from _pytest.config import hookimpl
  from _pytest.mark.evaluate import MarkEvaluator
  from _pytest.outcomes import fail
  from _pytest.outcomes import skip
  from _pytest.outcomes import xfail
label_desc: Use image node_id 7 for calling a global function with example usage: pytest_runtest_makereport(item, call) without return types