title: Pyramid run tests outside of main package
body: <p>I'm new to python, so I think it's more of an understanding thing that I am missing for this to not work. </p>
  
  <p>I've started by creating a a new Pyramid project, so that my directory structure looks like:</p>
  
  <pre>
  MyProject /
      - myproject /
          - static
          - templates
          - tests.py
          - views.py
      - development.ini
      - production.ini
      - setup.py
      - setup.cfg
  </pre>
  
  <p>How ever, I'm adding a lot of my business/service logic to a myprojectlib package under the root package directory, and also created a tests package, like so:</p>
  
  <pre>
  MyProject /
      - myproject /
          - tests.py
          - views.py
      - myprojectlib /
          - user_service.py
      - tests /
          - user_tests.py
      - setup.py
  </pre>
  
  <p>I've added the <strong>init</strong>.py files to the 'myprojectlib' and 'tests' folder to make them packages, but I can't seem to get the user_tests.py file (and subsequent test code) to be included in the <code>python setup.py test</code> command. Only the myproject/tests.py tests are included. </p>
  
  <p>My user_tests.py file contains a single test so far:</p>
  
  <pre>
  import unittest
  
  class UserTests(unittest.TestCase):
  
      def test_user_can_register(self):
  
          #code removed for example
  
  </pre>
  
  <p>How I tell python to look for tests in the /tests directory also?</p>
  
  <p>I've had a look at this post, and it seems I am doing all that it suggests: <a href="https://stackoverflow.com/questions/12145688/having-tests-in-multiple-files">Having tests in multiple files</a></p>
  
  <p>Thanks in advance for any help :)</p>
  
  <p>Cheers, 
  Justin</p>