From: Thomas Heller Date: Wed, 12 Dec 2007 08:32:02 +0000 (+0000) Subject: This test checks and modifies the value of an integer stored in a dll. X-Git-Tag: v3.0a3~304 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eeb49cd6678bc30f2131fa9eb2245c70c4100fc9;p=thirdparty%2FPython%2Fcpython.git This test checks and modifies the value of an integer stored in a dll. Restore the original value after modifying it so that subsequent tests will not fail. Fixes the failure in issue 1597. --- diff --git a/Lib/ctypes/test/test_values.py b/Lib/ctypes/test/test_values.py index 7ba3e21efa9c..a39674f3875b 100644 --- a/Lib/ctypes/test/test_values.py +++ b/Lib/ctypes/test/test_values.py @@ -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__)