On Wed, Nov 12, 2008 at 3:58 PM, Kumar McMillan <span dir="ltr"><<a href="mailto:kumar.mcmillan@gmail.com">kumar.mcmillan@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2. put all tests within your package. So if your package is<br>
foo/__init__.py you would have a directory like foo/tests/__init__.py,<br>
foo/tests/test_utils.py, etc. They will get deployed via python<br>
setup.py install<br>
</blockquote></div><br>What's the best way to import the module whose fixtures you want to test using this model, where your test module is in the tests/ subdirectory (pkg/tests/foo_tests.py), and the module is in the root directory (pkg/foo.py)? How do you put the the modules on sys.path for the tests, and make it work any way (e.g., if you're using setup.py to call out your tests)? Anyone care to point to code that uses this layout so we can get an example of how this is used in practice?<br>
<br>Thanks,<br>Chris<br>