title: pytest "No module named" error
body: <p>I'm new to python and trying to write a test for my first app.
  simple app structure:</p>
  
  <pre><code>- app
        - tests
          __init__.py
          - test_main.py
        - __init__.py
        - main.py
  </code></pre>
  
  <p>The <code>main.py</code> contains  <code>main_func</code></p>
  
  <p><strong>test_main.py:</strong></p>
  
  <pre><code>from main import main_func
  
  def test_check():
      assert main_func() is True
  </code></pre>
  
  <p>If i run the test manually, by the command <code>pytest</code> while in <code>app</code> directory - got this <strong>error:</strong></p>
  
  <pre><code>C:\Users\*****\PycharmProjects\checker3&gt;pytest
  ============================= test session starts =============================
  platform win32 -- Python 3.5.2, pytest-3.0.3, py-1.4.31, pluggy-0.4.0
  rootdir: C:\Users\*****\PycharmProjects\app, inifile:
  collected 0 items / 1 errors 
  
  =================================== ERRORS ====================================
  _____________________ ERROR collecting tests/test_main.py _____________________
  ImportError while importing test module 'C:\Users\*****\PycharmProjects\app\tests\test_main.py'.
  Original error message:
  'No module named 'main''
  Make sure your test modules/packages have valid Python names.
  !!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!
  =========================== 1 error in 0.14 seconds ===========================
  </code></pre>
  
  <p>the packages names are right. Also, i use the <code>PyCharm</code> IDE and it doesn't track any import package error.</p>
  
  <p>Moreover, when i execute the pytest test configuration through the IDE - test is working.</p>