[PyObjC-svn] r2125 - trunk/pyobjc/pyobjc-core/Lib/PyObjCTools
| Newsgroups | gmane.comp.python.pyobjc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ronaldoussoren
Date: Mon Mar 30 15:30:06 2009
New Revision: 2125
Log:
Minor testsupport enhancements
Modified:
trunk/pyobjc/pyobjc-core/Lib/PyObjCTools/TestSupport.py
Modified: trunk/pyobjc/pyobjc-core/Lib/PyObjCTools/TestSupport.py
==============================================================================
--- trunk/pyobjc/pyobjc-core/Lib/PyObjCTools/TestSupport.py (original)
+++ trunk/pyobjc/pyobjc-core/Lib/PyObjCTools/TestSupport.py Mon Mar 30 15:30:06 2009
@@ -319,7 +319,11 @@
offset = 0
info = method.__metadata__()
cnt = info['arguments'][argno+offset]['c_array_length_in_arg']
- if cnt != count + offset:
+ if isinstance(count, (list, tuple)):
+ count2 = tuple(x + offset for x in count)
+ else:
+ count2 = count + offset
+ if cnt != count2:
self.fail(message or "arg %d of %s is not a C-array of with length in arg %d"%(
argno, method, count))
------------------------------------------------------------------------------