title: How to collect my tests with py.test?
body: <p>I try to collect my tests with py.test but it doesn't do so. </p>
  
  <ul>
  <li><p><strong>Do I have to provide additional options at the command line?</strong></p></li>
  <li><p>Py.test was executed in the directory of my .py-file. <strong>Are there any other requirements?</strong></p></li>
  <li><p><strong>Are my tests named correctly?</strong> In my code I used 'Test-' for classes and 'test_' for methods.</p></li>
  </ul>
  
  <h2>The results from the terminal:</h2>
  
  <pre><code>&gt; py.test
  
  ===============================  in 0.00 seconds ============================
  user@host:~/workspace/my_project/src/html_extractor$ py.test
  
  ============================= test session starts ===========================
  platform linux2 -- Python 2.7.3 -- pytest-2.3.4
  plugins: xdist
  collected 0 items 
  </code></pre>
  
  <h2>My code under test:</h2>
  
  <pre><code>class Factories(object):
      TEST_LINKS = ['http://www.burgtheater.at',
                    'http://www.musikverein.at/']
  
      def links(self):
          for link in self.TEST_LINKS:
              yield link
  
  
  class TestHTMLExtractor(unittest.TestCase):
  
      def setUp(self):
          self.factory = Factories()
          self.extractor = HTMLExtractor()
  
  
      def test_extract_site_return(self):
          for link in self.factory.links():
               raw_html_page = self.extractor.run(link)
  
  def test_whatever():
      pass
  
  if __name__ == '__main__':
      unittest.main()
  </code></pre>