cpython: 49a2bed5185a (original) (raw)
Mercurial > cpython
changeset 91800:49a2bed5185a 2.7
Issue #19493: Fix two uses of ctypes.test.requires (it's not a decorator) and skip test_win32.FunctionCallTestCase.test_SEH when Python was compiled in debug configuration or by a non-MSC compiler. [#19493]
Zachary Ware zachary.ware@gmail.com | |
---|---|
date | Wed, 23 Jul 2014 14:29:25 -0500 |
parents | 61656684d295 |
children | 823f5507bd86 |
files | Lib/ctypes/test/test_python_api.py Lib/ctypes/test/test_win32.py |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-)[+] [-] Lib/ctypes/test/test_python_api.py 2 Lib/ctypes/test/test_win32.py 5 |
line wrap: on
line diff
--- a/Lib/ctypes/test/test_python_api.py +++ b/Lib/ctypes/test/test_python_api.py @@ -40,8 +40,8 @@ class PythonAPITestCase(unittest.TestCas # This test is unreliable, because it is possible that code in # unittest changes the refcount of the '42' integer. So, it # is disabled by default.
requires("refcount")[](#l1.9) ref42 = grc(42)[](#l1.10) pythonapi.PyInt_FromLong.restype = py_object[](#l1.11) self.assertEqual(pythonapi.PyInt_FromLong(42), 42)[](#l1.12)
--- a/Lib/ctypes/test/test_win32.py +++ b/Lib/ctypes/test/test_win32.py @@ -38,8 +38,11 @@ class WindowsTestCase(unittest.TestCase) @unittest.skipUnless(sys.platform == "win32", 'Windows-specific test') class FunctionCallTestCase(unittest.TestCase):
- @unittest.skipUnless('MSC' in sys.version, "SEH only supported by MSC")
- @unittest.skipIf(sys.executable.endswith('_d.exe'),
def test_SEH(self):"SEH not enabled in debug builds")[](#l2.10)
requires("SEH")[](#l2.12) # Call functions with invalid arguments, and make sure[](#l2.13) # that access violations are trapped and raise an[](#l2.14) # exception.[](#l2.15)