]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
This test checks and modifies the value of an integer stored in a dll.
authorThomas Heller <theller@ctypes.org>
Wed, 12 Dec 2007 08:32:02 +0000 (08:32 +0000)
committerThomas Heller <theller@ctypes.org>
Wed, 12 Dec 2007 08:32:02 +0000 (08:32 +0000)
Restore the original value after modifying it so that subsequent tests
will not fail.  Fixes the failure in issue 1597.

Lib/ctypes/test/test_values.py

index 7ba3e21efa9ca05b9123dade54c058815cacfcbc..a39674f3875bf95f73a2add07cc990bdde9e629c 100644 (file)
@@ -16,6 +16,8 @@ class ValuesTestCase(unittest.TestCase):
         self.failUnlessEqual(x, ctdll.get_an_integer())
         an_integer.value *= 2
         self.failUnlessEqual(x*2, ctdll.get_an_integer())
+        an_integer.value = x
+        self.failUnlessEqual(x, ctdll.get_an_integer())
 
     def test_undefined(self):
         ctdll = CDLL(_ctypes_test.__file__)