> I'm hoping Mark will find this interesting and investigate.  I don't
> quite understand how makepy.py let this slip by.  The first and third
> parameters are both VT_DISPATCH, so why would the first come up with a
> default of 0, when the third comes up with a default of None?
>
>
I assume these default values are coming from the COM library itself and
makepy.py is simply pulling these defaults.  According to Python Object
Browser, the first argument for Run is "Pointer User Defined" with default
value of 0 (See below).  I have identified another method, UpdateRun, that
exhibits the same problems.  A common element between the two methods is the
ResultsOptions parameter.  UpdateRun also includes an UpdateOptions
parameter which is similar.  Infact they should both be collections.  What's
interesting is that these two classes appear to be named _RunResultsOptions
and _UpdateRunOptions (see makepy gen output below).  Is this an issue with
win32com or HP QTP or both?

*Function definition for Run and UpdateRun Python Object Browser*
Run
Named Params = 'ResultsOptions, WaitOnReturn, Parameters'
Return Type = 'Void'
*Argument = 'Pointer User Defined (Flags=49) (Default=0)'*
Argument = 'BOOL (Flags=49) (Default=True)'
Argument = 'IDispatch (Flags=49)'
Function Kind = 'Dispatch'
Invoke Kind = 'Function'
Number Optional Params = 0

UpdateRun
Named Params = 'UpdateOptions, ResultsOptions, WaitOnReturn, Parameters'
Return Type = 'Void'
*Argument = 'Pointer User Defined (Flags=49) (Default=0)'
Argument = 'Pointer User Defined (Flags=49) (Default=0)'*
Argument = 'BOOL (Flags=49) (Default=True)'
Argument = 'IDispatch (Flags=49)'
Function Kind = 'Dispatch'
Invoke Kind = 'Function'
Number Optional Params = 0


*Class Def From makepy*
class _RunResultsOptions(DispatchBaseClass):
    """A collection of properties that indicate preferences for the test run
results."""
    CLSID = IID('{38B2828E-E64B-4D95-B0EF-0A1C74396FF9}')
    coclass_clsid = IID('{29E73840-B66F-4930-9345-139090CD1D16}')

    _prop_map_get_ = {
        "ResultsLocation": (1, 2, (8, 0), (), "ResultsLocation", None),
        "TDRunName": (2, 2, (8, 0), (), "TDRunName", None),
        "TDTestInstance": (4, 2, (3, 0), (), "TDTestInstance", None),
        "TDTestSet": (3, 2, (8, 0), (), "TDTestSet", None),
    }
    _prop_map_put_ = {
        "ResultsLocation": ((1, LCID, 4, 0),()),
        "TDRunName": ((2, LCID, 4, 0),()),
        "TDTestInstance": ((4, LCID, 4, 0),()),
        "TDTestSet": ((3, LCID, 4, 0),()),
    }

class _UpdateRunOptions(DispatchBaseClass):
    """A collection of properties that indicate preferences for the Update
Run."""
    CLSID = IID('{B0160C94-5EAD-42AD-846E-F82BA4186994}')
    coclass_clsid = IID('{4F8D498E-CEC8-4DB1-B128-A73A3C0A36FF}')

    _prop_map_get_ = {
        "UpdateActiveScreen": (1, 2, (11, 0), (), "UpdateActiveScreen",
None),
        "UpdateCheckpoints": (2, 2, (11, 0), (), "UpdateCheckpoints", None),
        "UpdateTestObjectDescriptions": (3, 2, (11, 0), (),
"UpdateTestObjectDescriptions", None),
    }
    _prop_map_put_ = {
        "UpdateActiveScreen": ((1, LCID, 4, 0),()),
        "UpdateCheckpoints": ((2, LCID, 4, 0),()),
        "UpdateTestObjectDescriptions": ((3, LCID, 4, 0),()),
    }

*Method def from **makepy*
    def UpdateRun(self, UpdateOptions=0, ResultsOptions=0,
WaitOnReturn=True, Parameters=None):
        """Runs the test or business component in update mode."""
        return self._oleobj_.InvokeTypes(16, LCID, 1, (24, 0), ((9, 49), (9,
49), (11, 49), (9, 49)),UpdateOptions
            , ResultsOptions, WaitOnReturn, Parameters)

    def Run(self, ResultsOptions=0, WaitOnReturn=True, Parameters=None):
        """Runs the open test or business component and creates results in
the specified file or Quality Center path."""
        return self._oleobj_.InvokeTypes(15, LCID, 1, (24, 0), ((9, 49),
(11, 49), (9, 49)),ResultsOptions
            , WaitOnReturn, Parameters)
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to