title: Meaning of unittest.main() in Python unittest module
body: <p>I was trying to learn unit testing in Python, specifically the <code>unittest</code> module.</p>
  
  <p>Consider the following lines:</p>
  
  <pre><code>import unittest
  
  class abc(unittest.TestCase):
      def xyz():
        ...
  
  if __name__ == "__main__":
      unittest.main()
  </code></pre>
  
  <p>I could see all my test cases running because of the call to <code>unittest.main()</code>.</p>
  
  <p>I was just curious to know how this call is making all the test cases run.</p>
  
  <p>I know since I'm inheriting from <code>unittest.TestCase</code> for every test class, it is doing all the magic. Any insights?</p>