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

Side by Side Diff: Lib/ctypes/test/test_pickling.py

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
Left:
Right:
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 unified diff | Download patch
« no previous file with comments | « Lib/ctypes/test/test_parameters.py ('k') | Lib/ctypes/test/test_pointers.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import os
1 import unittest 2 import unittest
2 import pickle 3 import pickle
3 from ctypes import * 4 from ctypes import *
4 import _ctypes_test 5 import _ctypes_test
5 dll = CDLL(_ctypes_test.__file__) 6 dll = CDLL(getattr(_ctypes_test, '__file__', os.environ['TEST_EXECUTABLE']))
6 7
7 class X(Structure): 8 class X(Structure):
8 _fields_ = [("a", c_int), ("b", c_double)] 9 _fields_ = [("a", c_int), ("b", c_double)]
9 init_called = 0 10 init_called = 0
10 def __init__(self, *args, **kw): 11 def __init__(self, *args, **kw):
11 X.init_called += 1 12 X.init_called += 1
12 self.x = 42 13 self.x = 42
13 14
14 class Y(X): 15 class Y(X):
15 _fields_ = [("str", c_char_p)] 16 _fields_ = [("str", c_char_p)]
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 self.dumps(c_wchar("x")) 73 self.dumps(c_wchar("x"))
73 74
74 for proto in range(pickle.HIGHEST_PROTOCOL + 1): 75 for proto in range(pickle.HIGHEST_PROTOCOL + 1):
75 name = 'PickleTest_%s' % proto 76 name = 'PickleTest_%s' % proto
76 globals()[name] = type(name, 77 globals()[name] = type(name,
77 (PickleTest, unittest.TestCase), 78 (PickleTest, unittest.TestCase),
78 {'proto': proto}) 79 {'proto': proto})
79 80
80 if __name__ == "__main__": 81 if __name__ == "__main__":
81 unittest.main() 82 unittest.main()
OLDNEW
« no previous file with comments | « Lib/ctypes/test/test_parameters.py ('k') | Lib/ctypes/test/test_pointers.py » ('j') | no next file with comments »

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