[Python-checkins] cpython (2.7): Issue #19493: Fix two uses of ctypes.test.requires (it's not a decorator)
zach.ware
python-checkins at python.org
Wed Jul 23 21:41:00 CEST 2014
http://hg.python.org/cpython/rev/49a2bed5185a
changeset: 91800:49a2bed5185a
branch: 2.7
parent: 91795:61656684d295
user: Zachary Ware <zachary.ware at gmail.com>
date: Wed Jul 23 14:29:25 2014 -0500
summary:
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.
files:
Lib/ctypes/test/test_python_api.py | 2 +-
Lib/ctypes/test/test_win32.py | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Lib/ctypes/test/test_python_api.py b/Lib/ctypes/test/test_python_api.py
--- a/Lib/ctypes/test/test_python_api.py
+++ b/Lib/ctypes/test/test_python_api.py
@@ -40,8 +40,8 @@
# 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")
def test_PyInt_Long(self):
+ requires("refcount")
ref42 = grc(42)
pythonapi.PyInt_FromLong.restype = py_object
self.assertEqual(pythonapi.PyInt_FromLong(42), 42)
diff --git a/Lib/ctypes/test/test_win32.py b/Lib/ctypes/test/test_win32.py
--- a/Lib/ctypes/test/test_win32.py
+++ b/Lib/ctypes/test/test_win32.py
@@ -38,8 +38,11 @@
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
class FunctionCallTestCase(unittest.TestCase):
- @requires("SEH")
+ @unittest.skipUnless('MSC' in sys.version, "SEH only supported by MSC")
+ @unittest.skipIf(sys.executable.endswith('_d.exe'),
+ "SEH not enabled in debug builds")
def test_SEH(self):
+ requires("SEH")
# Call functions with invalid arguments, and make sure
# that access violations are trapped and raise an
# exception.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list