title: Python: Unit Testing Module and Relative Imports
body: <p>Currently have the following file hierarchy:</p>
  
  <pre><code>\package
      __init__.py
      run_everything.py
  
      \subpackage
          __init__.py
          work.py
          work1.py
          work2.py
  
      \test
          __init__.py
          test_work.py
          test_work1.py
  </code></pre>
  
  <p>My first question is regarding relative imports. Suppose in \subpackage\work.py I have a function called custom_function(), and I would like to test that function in test_work.py. For some reason I can not figure out how to make this import from one module to another. Trying <code>from .. subpackage.work1 import custom_function()</code> does not seem to work, and yields the error <code>Attempted relative import in non-package</code> Is there any way to resolve this?</p>
  
  <p>2)
  I would like to run all test files from run_everything.py with one function, would adding a suite() function in each test_work*.py file, which adds each unit_testing class to suite.addTest(unittest.makeSuite(TestClass)), and finally importing them into the top-level run_everything.py be the most <em>conventional way</em> in Python2.7?</p>