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

Unified Diff: Lib/ctypes/test/test_win32.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_values.py ('k') | Lib/ctypes/util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/ctypes/test/test_win32.py Tue Mar 01 10:26:10 2016 +0200
+++ b/Lib/ctypes/test/test_win32.py Wed Mar 02 00:01:35 2016 +0000
@@ -1,11 +1,12 @@
# Windows specific tests
from ctypes import *
+import os
import unittest, sys
from test import support
import _ctypes_test
# Only windows 32-bit has different calling conventions.
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
@unittest.skipUnless(sizeof(c_void_p) == sizeof(c_int),
@@ -104,17 +105,17 @@ class Structures(unittest.TestCase):
("y", c_long)]
class RECT(Structure):
_fields_ = [("left", c_long),
("top", c_long),
("right", c_long),
("bottom", c_long)]
- dll = CDLL(_ctypes_test.__file__)
+ dll = CDLL(getattr(_ctypes_test, '__file__', os.environ['TEST_EXECUTABLE']))
pt = POINT(15, 25)
left = c_long.in_dll(dll, 'left')
top = c_long.in_dll(dll, 'top')
right = c_long.in_dll(dll, 'right')
bottom = c_long.in_dll(dll, 'bottom')
rect = RECT(left, top, right, bottom)
PointInRect = dll.PointInRect
« no previous file with comments | « Lib/ctypes/test/test_values.py ('k') | Lib/ctypes/util.py » ('j') | no next file with comments »

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