[qmtest] problem with qmtest tutorial

Stefan Seefeld seefeld at sympatico.ca
Thu Dec 16 01:39:41 UTC 2004


Mark Mitchell wrote:
 > thomas guyonnet wrote:
 >
 >> hello,
 >> I try to use QMTest on window and it seems to have some bugs with the
 >> example:
 >> - when I try to examin the test clicking on the exec1 label, a new
 >> page appear with this dialog:
 >
 >
 > That's very odd; I've never seen that before.  It's possible that it's a
 > side effect of using Python 2.4, but I'm not sure why that would be. I'm
 > afraid that you'll have to debug the code.

I'v debugged that a bit, and I can confirm the bug. It is caused by the
wrong use of the binary 'is' operator to compare strings in the 'web.py'
module, which accidentally worked on python prior to version 2.4.
The control flow falls through the comparison around line 2057 where
it is assumed that the 'type' variable is either 'test' or 'resource'.
As both tests fail, the 'item' variable remains unbound, and thus the
exception is thrown.
Solution: replace the use of 'is' by '==' to compare strings.

Regards,
		Stefan



More information about the qmtest mailing list