[qmtest] Python unit tests

Mark Mitchell mark at codesourcery.com
Wed Apr 6 18:35:14 UTC 2005


Neilen Marais wrote:

> B) is unattractive, since that would clutter every test case with code
> to read environment variables. Not a lot of code, but still unnecesary
> repetition.

I think that's the best solution at the moment.  Because these are 
ExecTests, they're designed to run arbitrary programs; the fact that 
they happen to be written in Python, like QMTest, is just coincidence. 
So, there's nothing for QMTest to do to set up the load path.

Now, you could of course build a test class designed especially for 
running Python files.  You could derive from the ExecTest class, and 
override MakeEnvironment to set up PYTHONPATH.

-- 
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com
(916) 791-8304



More information about the qmtest mailing list