Update of /cvsroot/pywin32/pywin32/com/win32com/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15938/com/win32com/test
Modified Files:
testPyComTest.py
Log Message:
Explicit tests for VT_UI1 safe arrays being passed buffers and integers
Index: testPyComTest.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** testPyComTest.py 4 Jan 2009 22:35:44 -0000 1.42
--- testPyComTest.py 9 Jan 2009 01:24:54 -0000 1.43
***************
*** 9,12 ****
--- 9,13 ----
import win32com
from win32com.test.util import RegisterPythonServer
+ from pywin32_testutil import str2memory
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++"
***************
*** 263,266 ****
--- 264,272 ----
TestApplyResult(o.SetVariantSafeArray, (l,), len(l))
TestApplyResult(o.SetIntSafeArray, (l,), len(l))
+ # check we can pass ints as a VT_UI1
+ TestApplyResult(o.SetBinSafeArray, (l,), len(l))
+ # and binary
+ TestApplyResult(o.SetBinSafeArray, (str2memory('foo\0bar'),), 7)
+
l=[]
TestApplyResult(o.SetVariantSafeArray, (l,), len(l))
|