adding context variables in a target extension class
Steve Byan
smb at egenera.com
Wed Nov 19 22:41:57 UTC 2003
I'd like to add some test context variables in a target extension
class. Unless I've missing something (quite possible), the only obvious
place where a target extension class can get its paws on the context is
in the RunTest method. So I imagine something like this:
def RunTest(self, descriptor, context):
properties = { "TARGET_HOSTNAME" : "minigolf.egenera.com" }
context = ContextWrapper(context, properties)
Target.RunTest(self, descriptor, context)
It seems a little heavyweight to be constructing a ContextWrapper in
the RunTest method in the MyTarget class and then constructing yet
another ContextWrapper on the ContextWrapper in the RunTest method in
the base Target class. Have I missed something - isn't there a way to
add to the context in the __init__ or Start methods?
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