Specifying arguments in derived test classes

Vladimir Prus ghost at cs.msu.su
Fri Apr 12 13:19:05 UTC 2002


Hi,
I'm trying to create a test class that would derive from python.ExecTest and 
change it a little. In particular, I want to get rid of 'expession' argument. 
I'm trying the following:

class Test(python.ExecTest):

    arguments = [
        qm.fields.TextField(
            name="source",
            title="Python Source Code",
            description="""The source code.

            This code may contain class definitions, function
            definitions, statements, and so forth.  If this code
            throws an uncaught exception, the test will fail.""",
            verbatim="true",
            multiline="true",
            default_value="pass"
            )
        ]

    def __init__(self, **properties):

        apply(python.ExecTest.__init__, (self,), properties)
        self.expression = None
    
    def Run(self, context, result):
	# Not relevant here

However, I get a test class with three arguments: two defined in 
python.ExecTest and one defined in my class. How can I accomplish what I want?

- Volodya



More information about the qmtest mailing list