[Twisted-Python] trial on specific directory
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. Thanks, Nate
On 9/12/07, Nathaniel Haggard <natester@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
Usually I do it with a .pth file (appropirately named) in Lib/site-packages. Say for twisted I work with the svn checkout in /home/proj/twisted while having a file called twisted.pth in Lib/site-packages with the single line content of /home/proj/twisted This way I do not have to install twisted every time I do a svn update. For other path/package hacks see site.py in your local python installation. HTH, Werner Nathaniel Haggard 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.
Thanks, Nate
------------------------------------------------------------------------
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
participants (3)
-
Jonathan Lange -
Nathaniel Haggard -
Werner Thie