[python3/python3.3] fix test_sys (patch 134)

dmalcolm dmalcolm at fedoraproject.org
Mon Jul 23 15:29:22 UTC 2012


commit a4dad5ac963722f3671bb45b6cf51c60e7e40cbd
Author: David Malcolm <dmalcolm at redhat.com>
Date:   Mon Jul 23 11:27:17 2012 -0400

    fix test_sys (patch 134)

 00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch b/00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch
index 18549cb..379385f 100644
--- a/00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch
+++ b/00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch
@@ -1,11 +1,19 @@
 diff -up Python-3.3.0b1/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys Python-3.3.0b1/Lib/test/test_sys.py
---- Python-3.3.0b1/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys	2012-06-26 16:19:48.000000000 -0400
-+++ Python-3.3.0b1/Lib/test/test_sys.py	2012-07-20 13:44:23.050740172 -0400
-@@ -869,6 +869,9 @@ class SizeofTest(unittest.TestCase):
+--- Python-3.3.0b1/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys	2012-07-23 11:18:52.524602807 -0400
++++ Python-3.3.0b1/Lib/test/test_sys.py	2012-07-23 11:25:54.641325620 -0400
+@@ -863,12 +863,17 @@ class SizeofTest(unittest.TestCase):
+         # type
+         # static type: PyTypeObject
+         s = size(vh + 'P2P15Pl4PP9PP11PI')
++        # COUNT_ALLOCS adds a further 3 Py_ssize_t and 2 pointers:
++        if hasattr(sys, 'getcounts'):
++            s += size('3P2P')
+         check(int, s)
+         # (PyTypeObject + PyNumberMethods + PyMappingMethods +
+         #  PySequenceMethods + PyBufferProcs + 4P)
          s = size(vh + 'P2P15Pl4PP9PP11PI') + size('34P 3P 10P 2P 4P')
          # Separate block for PyDictKeysObject with 4 entries
          s += size("PPPP") + 4*size("PPP")
-+        # COUNT_ALLOCS adds a further 3 Py_ssize_t and 2 pointers:
 +        if hasattr(sys, 'getcounts'):
 +            s += size('3P2P')
          # class


More information about the scm-commits mailing list