Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(89081)

Unified Diff: Lib/ctypes/test/test_parameters.py

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/ctypes/test/test_libc.py ('k') | Lib/ctypes/test/test_pickling.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/ctypes/test/test_parameters.py Tue Mar 01 10:26:10 2016 +0200
+++ b/Lib/ctypes/test/test_parameters.py Wed Mar 02 00:01:35 2016 +0000
@@ -1,8 +1,9 @@
+import os
import unittest, sys
from ctypes.test import need_symbol
class SimpleTypesTestCase(unittest.TestCase):
def setUp(self):
import ctypes
try:
@@ -134,17 +135,17 @@ class SimpleTypesTestCase(unittest.TestC
self.assertRaises(TypeError, LPINT.from_param, c_short*3)
self.assertRaises(TypeError, LPINT.from_param, c_long*3)
self.assertRaises(TypeError, LPINT.from_param, c_uint*3)
def test_noctypes_argtype(self):
import _ctypes_test
from ctypes import CDLL, c_void_p, ArgumentError
- func = CDLL(_ctypes_test.__file__)._testfunc_p_p
+ func = CDLL(getattr(_ctypes_test, '__file__', os.environ['TEST_EXECUTABLE']))._testfunc_p_p
func.restype = c_void_p
# TypeError: has no from_param method
self.assertRaises(TypeError, setattr, func, "argtypes", (object,))
class Adapter(object):
def from_param(cls, obj):
return None
« no previous file with comments | « Lib/ctypes/test/test_libc.py ('k') | Lib/ctypes/test/test_pickling.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+