[Twisted-Python] Twisted Trial

Christian Simms christian.simms at gmail.com
Tue Jun 17 15:51:05 EDT 2008

On Tue, Jun 17, 2008 at 2:14 PM, Torsten A. <c2k_list at gmx.de> wrote:
> Hello,
> I received a running project using twisted trial, running meaning that all
> test units pass successfully, which I am supposed to edit. Now I'd like to
> keep two versions of the project:
> a) A backup of the old one, so I can always have it successfully run the
> unittests and keep track of its behavious and
> b) a copy of the project which I want to modify and test, if the trials
> pass.
> I have tried to mess with the PYTHONPATH, to run trial in the folder of the
> copies, but nothing seems to work. Right now it looks like this (running
> under WinXP):
> C:\
>        some_folder\
>                working_project\here_the_module_to_be_checked
>                modified_project\here_the_module_to_be_checked
> My PYTHONPATH links to C:\some_folder\working_project.
> I hopesome understands what I mean ;)
> Cheers,
> Torsten
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

I think this is a basic Python question.  If you set your PYTHONPATH
variable to . (period), then when you import a python package it will
look in the current working directory for the package, and then the
standard system directories.  This way, to test both the original and
modified versions, you would do:

  cd \original_project
  trial package_to_test

  cd \modified_project
  trial package_to_test


More information about the Twisted-Python mailing list