title: Run all tests from subdirectories in Python
body: <p>I am at my wits end with trying to get all my unittest to run in Python. I have searched about 30 different posts and the unit test documentation but still cannot figure it out.</p>
  
  <p>First I have two test classes that I can run each individually and all the tests pass:</p>
  
  <p>File: unittest.subfolder1.TestObject1.py</p>
  
  <pre><code>class TestObject1(unittest.TestCase):
    def test_case1(self):
      ...some code...
      ...some assertions...
  
  if __name__ == '__main__':
    unittest.main()
  </code></pre>
  
  <p>File: unittest.subfolder2.TestObject2.py</p>
  
  <pre><code>class TestObject2(unittest.TestCase):
    def test_case1(self):
      ...some code...
      ...some assertions...
  
  if __name__ == '__main__':
    unittest.main()
  </code></pre>
  
  <p>Starting in the top level directory above 'unittest' I am trying to us <code>unittest.discover</code> to find and run all my tests:</p>
  
  <pre><code>import unittest
  
  loader = unittest.TestLoader()
  suite = loader.discover('unittest')
  unittest.TextTestRunner().run(suite)
  </code></pre>
  
  <p>When I do this I get the error `ModuleNotFoundError: No module named 'subfolder1.TestObject1'</p>
  
  <p>What am I doing wrong?</p>