title: How to check exception cause using pytest raises?
body: <p>I'd like to test that an exception is raised from another exception type.</p>
  <pre><code>import pytest
  
  
  def throw_with_cause():
    raise Exception(&quot;Failed&quot;) from ValueError(&quot;That was unexpected.&quot;)
   
  with pytest.raises(Exception): # from ValueError???
    throw_with_cause()
  </code></pre>
  <p>I'm surprised not to see a way to inspect the exception chain in the pytest raises docs.  <a href="https://docs.pytest.org/en/6.2.x/reference.html#pytest-raises" rel="nofollow noreferrer">https://docs.pytest.org/en/6.2.x/reference.html#pytest-raises</a></p>
  <p>Is there a clean way to do this using ptyest raises?</p>