title: PyCharm Nosetests - unrecognised tests
body: <p>I have various forms of this issue repeatedly with PyCharm and nosetest integration.</p>
  
  <p>Right click does not recognise certain tests or that the class/module contains nosetests at all.</p>
  
  <p>I have searched through many, many SO answers and still haven't got to the bottom of this.</p>
  
  <p>Here is the current reproduction of the issue.  The content of the tests is not really relevant, but it is testing a singleton wrapper around a DB interface.</p>
  
  <pre><code>class MyDBTest(unittest.TestCase):
  
    def setup(self):
      self.db = db_utils.get_connection(constants)
  
    def teardown(self):
      db_utils.truncate_all_my_tables(self.db)
      self.db.commit()
      self.db.close()
  
    def test_same_instance(self):
      other_instance = db_utils.get_connection(constants)
      assert other_instance is self.db
  
    def test_basic_query(self):
      cur = self.db.cursor()
      sql = "SELECT %s"
      cur.execute(sql, "Test")
      assert cur.rowcount == 1, "Expected one row, got &lt;{0!s}&gt;".format(cur.rowcount)
  
    def test_reopen_connection(self):
      self.db.close()
      self.db = db_utils.get_connection(constants)
      cur = self.db.cursor()
      sql = "SELECT %s"
      cur.execute(sql, "Test")
      assert cur.rowcount == 1, "Expected one row, got &lt;{0!s}&gt;".format(cur.rowcount)
  </code></pre>
  
  <p>If I right click on the test "test_basic_query" I get the context menu option: "Run Nosetest test_basic_query" and clicking it does indeed run the test, including the setup and teardown.</p>
  
  <p>However right clicking on the other tests only presents the "run test_db_wrapper" option.  Right clicking on the file in the Project pane only provides this option as well.</p>
  
  <p>Running this file from the command line with the nosetests3 executable does something even weirder.  It runs all three tests, but does not run the setup and teardown.</p>
  
  <p>Note I have tried re-ordering, renaming the tests.  I have tried inheriting from object, nothing or unittest.TestCase.  I have other test classes that look exactly like this and they work.</p>
  
  <p>This is just one example, this happens to us all the time.  It just seems random.</p>
  
  <p>PyCharm version is: 
  PyCharm Community Edition 2016.1.4
  Build #PC-145.1504, built on May 25, 2016
  JRE: 1.8.0_76-release-b198 amd64
  JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o</p>