def TestDynamic():
    progress('Testing Dynamic')
    import win32com.client.dynamic
    o = win32com.client.dynamic.DumbDispatch('PyCOMTest.PyCOMTest')
    TestCommon(o, False)
    counter = win32com.client.dynamic.DumbDispatch('PyCOMTest.SimpleCounter')
    TestCounter(counter, False)
    try:
        check_get_set_raises(ValueError, o.GetSetInt, 'foo')
        raise error('no exception raised')
    except pythoncom.com_error as exc:
        if (exc.hresult != winerror.DISP_E_TYPEMISMATCH):
            raise
    arg1 = VARIANT((pythoncom.VT_R4 | pythoncom.VT_BYREF), 2.0)
    arg2 = VARIANT((pythoncom.VT_BOOL | pythoncom.VT_BYREF), True)
    arg3 = VARIANT((pythoncom.VT_I4 | pythoncom.VT_BYREF), 4)
    o.TestInOut(arg1, arg2, arg3)
    assert (arg1.value == 4.0), arg1
    assert (arg2.value == False)
    assert (arg3.value == 8)
def TestDynamic():
    progress('Testing Dynamic')
    import win32com.client.dynamic
    o = win32com.client.dynamic.DumbDispatch('PyCOMTest.PyCOMTest')
    TestCommon(o, False)
    counter = win32com.client.dynamic.DumbDispatch('PyCOMTest.SimpleCounter')
    TestCounter(counter, False)
    try:
        check_get_set_raises(ValueError, o.GetSetInt, 'foo')
        raise error('no exception raised')
    except pythoncom.com_error as exc:
        if (exc.hresult != winerror.DISP_E_TYPEMISMATCH):
            raise
    arg1 = VARIANT((pythoncom.VT_R4 | pythoncom.VT_BYREF), 2.0)
    arg2 = VARIANT((pythoncom.VT_BOOL | pythoncom.VT_BYREF), True)
    arg3 = VARIANT((pythoncom.VT_I4 | pythoncom.VT_BYREF), 4)
    o.TestInOut(arg1, arg2, arg3)
    assert (arg1.value == 4.0), arg1
    assert (arg2.value == False)
    assert (arg3.value == 8)