SetField not_empty_set property

Steve Byan smb at egenera.com
Thu Apr 29 13:22:06 UTC 2004


I'm trying to create a resource class which has an argument which is a 
set of EnumerationField values, and I'd like to require that the set be 
non-empty. Consequently I'd like to set the not_empty_set property of 
the SetField argument class to "true". I'm having trouble figuring out 
the syntax for doing that.

All the classes in the QMTest distribution which use SetField arguments 
use the default setting of "false" for the not_emptry_set property, so 
I don't see any examples. I notice that the __init___ method of 
SetField doesn't include a **properties argument, and sure enough, 
trying to set the not_empty_set property via a keyword argument results 
in a exception:

Exception 'exceptions.TypeError' : '__init__() got an unexpected 
keyword argument 'not_empty_set''

Next, I noticed that SetField appears to add the properties of the 
contained field to its own properties, so I tried setting the keyword 
argument in the contained field. No go:

Exception 'qm.common.QMException' : 'There is no "not_empty_set" 
argument to the "qm.fields.EnumerationField" extension class.'

I'm (still) using the QMTest 2.0.3 distribution (I don't want to 
upgrade in the middle of the project, and 2.1 wasn't available when I 
started), and (as should be clear by now :-), I'm in over my head in 
hacking the QMTest python code.

Would some kind soul please show me an example of how to set the 
SetField not_empty_set property value? Thanks.

Regards,
-Steve
--------
Steve Byan <smb at egenera.com>
Software Architect
Egenera, Inc.
165 Forest Street
Marlboro, MA 01752
(508) 858-3125




More information about the qmtest mailing list