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

Unified Diff: Lib/ctypes/test/test_cfuncs.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_callbacks.py ('k') | Lib/ctypes/test/test_checkretval.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/ctypes/test/test_cfuncs.py Tue Mar 01 10:26:10 2016 +0200
+++ b/Lib/ctypes/test/test_cfuncs.py Wed Mar 02 00:01:35 2016 +0000
@@ -1,19 +1,20 @@
# A lot of failures in these tests on Mac OS X.
# Byte order related?
+import os
import unittest
from ctypes import *
from ctypes.test import need_symbol
import _ctypes_test
class CFunctions(unittest.TestCase):
- _dll = CDLL(_ctypes_test.__file__)
+ _dll = CDLL(getattr(_ctypes_test, '__file__', os.environ['TEST_EXECUTABLE']))
def S(self):
return c_longlong.in_dll(self._dll, "last_tf_arg_s").value
def U(self):
return c_ulonglong.in_dll(self._dll, "last_tf_arg_u").value
def test_byte(self):
self._dll.tf_b.restype = c_byte
@@ -201,12 +202,12 @@ else:
if name[:2] == '__' and name[-2:] == '__':
raise AttributeError(name)
func = self._FuncPtr(("s_" + name, self))
setattr(self, name, func)
return func
@need_symbol('WinDLL')
class stdcallCFunctions(CFunctions):
- _dll = stdcall_dll(_ctypes_test.__file__)
+ _dll = stdcall_dll(getattr(_ctypes_test, '__file__', os.environ['TEST_EXECUTABLE']))
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « Lib/ctypes/test/test_callbacks.py ('k') | Lib/ctypes/test/test_checkretval.py » ('j') | no next file with comments »

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