title: Why does pycharm not recognize my pytest tests and show the test output?
body: <p>I'm new to pytest and am trying to write testing modules for my application.   My directory structure is:</p>
  
  <pre><code>broker/
  broker/tests
  broker/tests/conftest.py
  broker/tests/test_db.py
  broker/db.py
  </code></pre>
  
  <p>I want to test the db.py module.</p>
  
  <p>I configure pycharm to use pytest as my test runner.    When I run the test_db.py in pycharm I get:</p>
  
  <pre><code>/Users/cbogdon/virtualenv/platinum-onboard/bin/python /Users/cbogdon/coding/platinum-onboard/broker/tests/test_db.py
  
  Process finished with exit code 0
  </code></pre>
  
  <p>It's almost like pycharm is not executing the pytest.   Even if I right click on the green arrow to the left of one of my testing functions a menu appears and shows I can click:   "Run 'pytest for test_db.py::TestDBFunctions::test_valid_db'"</p>
  
  <p>If I run it at the command line using:</p>
  
  <pre><code>python -m pytest --setup-show tests/test_db.py 
  </code></pre>
  
  <p>I get the appropriate test output.</p>
  
  <pre><code> python -m pytest --setup-show tests/test_db.py 
  ========================================================== test session starts ===========================================================
  platform darwin -- Python 3.6.1, pytest-4.1.1, py-1.7.0, pluggy-0.8.1
  rootdir: /Users/cbogdon/coding/platinum-onboard/broker, inifile:
  collected 4 items                                                                                                                        
  
  tests/test_db.py 
          tests/test_db.py::TestDBFunctions::test_uuid.
          tests/test_db.py::TestDBFunctions::test_invalid_dbF
          tests/test_db.py::TestDBFunctions::test_valid_db.
          tests/test_db.py::TestDBFunctions::test_already_created_database.
  
  ================================================================ FAILURES ================================================================
  ____________________________________________________ TestDBFunctions.test_invalid_db _____________________________________________________
  
  self = &lt;test_db.TestDBFunctions object at 0x102606438&gt;
  
      def test_invalid_db(self):
  &gt;       ret = db.initialize_database()
  E       TypeError: initialize_database() missing 1 required positional argument: 'dbname'
  
  tests/test_db.py:14: TypeError
  =================================================== 1 failed, 3 passed in 0.08 seconds ==================================================
  </code></pre>
  
  <p>Is there something special I need to do in PyCharm?</p>
  
  <p>Sorry for the newbie question, but I just can't figure this out one bit!</p>