Only run one specific test
Yinon Ehrlich
yinon.me at gmail.com
Sun May 31 04:30:32 EDT 2009
>
> Yes, that works indeed. But in practice the modules_to_import list is
> filled by parsing the contents of a test/*.py directory. That's why I
> import dynamically with __import__.
>
> Nevertheless, you got me on the right track. After I explicitly added
> the modules to the global namespace (globals()["mytest"] =
> __import__("mytest")), it works fine. Thx!
Another way to do it is using imp.load_source,
see http://waf.googlecode.com/svn/trunk/test/Test.py
Yinon
More information about the Python-list
mailing list