title: pytest.skip for a specific exception
body: <p>I have some test codes to check contents of target file like :</p>
  <pre><code>sc = samplechecker(json_root, 'target_file_to_check', {params})
  result = sc.run()
  res = sc.getId()
  taskIds.append(res['data']['Id'])
  assert result
  </code></pre>
  <p>And want to skip test if target file is not exist, so modified the code :</p>
  <pre><code>try :
      sc = samplechecker(json_root, 'target_file_to_check', {params})
  except FileNotFoundError as exc:
      pytest.skip(f&quot;!!! Target file {exc.filename} not found !!!&quot;)
  
  result = sc.run()
  res = sc.getId()
  taskIds.append(res['data']['Id'])
  assert result
  </code></pre>
  <p>This works fine for this one case, but I have several similar test modules so would like to apply this to all other cases as well. So tried to add pytest_exception_interact in conftest.py :</p>
  <pre><code>in conftest.py :
  
  import pytest
  
  @pytest.hookimpl()
  def pytest_exception_interact(node, call, report):
      excinfo = call.excinfo
      excvalue = excinfo.value
  
      if excinfo.type == FileNotFoundError:
          pytest.skip(f&quot;!!! Target file {excvalue.filename} not found !!!&quot;)
  </code></pre>
  <p>But it doesn't work the way I want. Just failed with many of internal error.</p>
  <pre><code>...
  INTERNALERROR&gt;   File &quot;/home/jyoun/work/venv_xdr-ac/lib/python3.7/site-packages/pluggy/callers.py&quot;, line 208, in _multicall
  INTERNALERROR&gt;     return outcome.get_result()
  INTERNALERROR&gt;   File &quot;/home/jyoun/work/venv_xdr-ac/lib/python3.7/site-packages/pluggy/callers.py&quot;, line 80, in get_result
  INTERNALERROR&gt;     raise ex[1].with_traceback(ex[2])
  INTERNALERROR&gt;   File &quot;/home/jyoun/work/venv_xdr-ac/lib/python3.7/site-packages/pluggy/callers.py&quot;, line 187, in _multicall
  INTERNALERROR&gt;     res = hook_impl.function(*args)
  INTERNALERROR&gt;   File &quot;/home/jyoun/work/venv_xdr-ac/git/SOC-SampleCode/api_reference/test/conftest.py&quot;, line 26, in pytest_exception_interact
  INTERNALERROR&gt;     pytest.skip(f&quot;!!! Target file {excvalue.filename} not found !!!&quot;)
  INTERNALERROR&gt;   File &quot;/home/jyoun/work/venv_xdr-ac/lib/python3.7/site-packages/_pytest/outcomes.py&quot;, line 112, in skip
  INTERNALERROR&gt;     raise Skipped(msg=msg, allow_module_level=allow_module_level)
  INTERNALERROR&gt; Skipped: !!! Target file ../sample/targetfile1 not found !!!
  </code></pre>
  <p>How can I reach for the target I want?</p>