[Twisted-Python] trial on specific directory

Jonathan Lange jml at mumak.net
Tue Sep 11 19:56:39 EDT 2007


On 9/12/07, Nathaniel Haggard <natester at gmail.com> wrote:
> How do I tell trial to test the code in /mydir with the
> /mydir/test/test_class1 instead testing the code from /lib/site-packages
> like it does by default.
>

When given a module name, Trial looks in the Python path for that
module. You have two options:

1. Put mydir in the Python path before site-packages.
2. Give Trial a path to a directory, rather than a module.

jml




More information about the Twisted-Python mailing list