Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3536a5c commit b8189f3Copy full SHA for b8189f3
1 file changed
Lib/ctypes/test/test_values.py
@@ -10,12 +10,16 @@
10
class ValuesTestCase(unittest.TestCase):
11
12
def test_an_integer(self):
13
+ # This test checks and changes an integer stored inside the
14
+ # _ctypes_test dll/shared lib.
15
ctdll = CDLL(_ctypes_test.__file__)
16
an_integer = c_int.in_dll(ctdll, "an_integer")
17
x = an_integer.value
18
self.failUnlessEqual(x, ctdll.get_an_integer())
19
an_integer.value *= 2
20
self.failUnlessEqual(x*2, ctdll.get_an_integer())
21
+ # To avoid test failures when this test is repeated several
22
+ # times the original value must be restored
23
an_integer.value = x
24
25
0 commit comments