[pywin32-checkins] pywin32/com/win32com/test testPyComTest.py, 1.29, 1.30
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-04-08 11:51:21
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20576/win32com/test Modified Files: testPyComTest.py Log Message: Fix and test some limitations passing around currency objects. Should fix [ 1935488 ] gencache and Delphi Currency Index: testPyComTest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** testPyComTest.py 20 Oct 2007 05:24:52 -0000 1.29 --- testPyComTest.py 8 Apr 2008 11:51:26 -0000 1.30 *************** *** 12,16 **** importMsg = "**** PyCOMTest is not installed ***\n PyCOMTest is a Python test specific COM client and server.\n It is likely this server is not installed on this machine\n To install the server, you must get the win32com sources\n and build it using MS Visual C++" ! error = "testPyCOMTest error" # This test uses a Python implemented COM server - ensure correctly registered. --- 12,16 ---- importMsg = "**** PyCOMTest is not installed ***\n PyCOMTest is a Python test specific COM client and server.\n It is likely this server is not installed on this machine\n To install the server, you must get the win32com sources\n and build it using MS Visual C++" ! error = Exception # This test uses a Python implemented COM server - ensure correctly registered. *************** *** 150,153 **** --- 150,158 ---- if o.CurrencyProp != decimal.Decimal("1234.5678"): raise error, "got %r" % (o.CurrencyProp,) + v1 = decimal.Decimal("1234.5678") + # can't do "DoubleCurrencyByVal" in dynamic files. + TestApplyResult(o.DoubleCurrency, (v1,), v1*2) + v2 = decimal.Decimal("9012.3456") + TestApplyResult(o.AddCurrencies, (v1, v2), v1+v2) # damn - props with params don't work for dynamic objects :( *************** *** 312,315 **** --- 317,325 ---- if o.CurrencyProp != decimal.Decimal(val): raise error, "%s got %r" % (val, o.CurrencyProp) + v1 = decimal.Decimal("1234.5678") + TestApplyResult(o.DoubleCurrency, (v1,), v1*2) + TestApplyResult(o.DoubleCurrencyByVal, (v1,), v1*2) + v2 = decimal.Decimal("9012.3456") + TestApplyResult(o.AddCurrencies, (v1, v2), v1+v2) o.SetParamProp(0, 1) |