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

Unified Diff: Lib/ctypes/test/test_values.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_unicode.py ('k') | Lib/ctypes/test/test_win32.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/ctypes/test/test_values.py Tue Mar 01 10:26:10 2016 +0200
+++ b/Lib/ctypes/test/test_values.py Wed Mar 02 00:01:35 2016 +0000
@@ -1,24 +1,25 @@
"""
A testcase which accesses *values* in a dll.
"""
+import os
import unittest
import sys
from ctypes import *
import _ctypes_test
class ValuesTestCase(unittest.TestCase):
def test_an_integer(self):
# This test checks and changes an integer stored inside the
# _ctypes_test dll/shared lib.
- ctdll = CDLL(_ctypes_test.__file__)
+ ctdll = CDLL(getattr(_ctypes_test, '__file__', os.environ['TEST_EXECUTABLE']))
an_integer = c_int.in_dll(ctdll, "an_integer")
x = an_integer.value
self.assertEqual(x, ctdll.get_an_integer())
an_integer.value *= 2
self.assertEqual(x*2, ctdll.get_an_integer())
# To avoid test failures when this test is repeated several
# times the original value must be restored
an_integer.value = x
« no previous file with comments | « Lib/ctypes/test/test_unicode.py ('k') | Lib/ctypes/test/test_win32.py » ('j') | no next file with comments »

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