title: How do you run unit tests in Python in the REPL?
body: <p>I'm trying to develop unit tests in Python using unittest from the Standard Library, and I want to try things out in the REPL. If I have the following code loaded</p>
  
  <pre><code>import unittest
  
  class TestTrivial(unittest.TestCase):
      def test_trivial(self):
          self.assertEqual(1 + 1, 2)
          self.assertFalse(2 + 2 == 5)
  </code></pre>
  
  <p>Then I can evaluate the following in the REPL:</p>
  
  <pre><code>unittest.main()
  </code></pre>
  
  <p>That spits out:</p>
  
  <pre><code>Ran 1 test in 0.000s
  
  OK
  
  Process Python finished
  </code></pre>
  
  <p>The problem is it killed the REPL. How do I run it without quitting the REPL?</p>