title: How do I exit from pdb debugging when running hypothesis?
body: <p>I like using <a href="https://hypothesis.readthedocs.io/" rel="nofollow noreferrer">hypothesis</a> for my unit tests. I also like using <code>pdb</code> for debugging when things go wrong. But trying to use these two together can be very annoying. If I set a breakpoint in a file that is run by hypothesis using <code>pytest &lt;PATH-TO-FILE&gt; -s</code>, it will stop at the breakpoint as expected, and I can do my analysis. But after I am done, I want to be able to exit out of the test. However, if I do <code>ctrl+c</code> from inside the breakpoint, the test doesn't quit, it simply goes to the next hypothesis test case. And I have to keep doing this until hypothesis is done generating all it's test cases.</p>
  <p>I usually end up opening system monitor and killing the pytest process everytime I want to be able to quit the test.</p>
  <p>I'm hoping there is a better way.</p>
  <p>The issue can be reproduced by the following snippet -</p>
  <pre><code>import hypothesis
  from hypothesis import strategies as st
  
  @hypothesis.given(st.integers())
  def test_some_function(some_arg):
      breakpoint()
      print(some_arg)
  
  test_some_function()
  </code></pre>
  <p>I am using python 3.8 with hypothesis 5.37.0</p>