[Python-checkins] cpython (2.7): Don't run the test for issue #16335 when -M is not specified.

serhiy.storchaka python-checkins at python.org
Fri Jan 25 09:18:05 CET 2013


http://hg.python.org/cpython/rev/fc21f8e83062
changeset:   81694:fc21f8e83062
branch:      2.7
parent:      81691:8f2edea69d5d
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Fri Jan 25 10:03:12 2013 +0200
summary:
  Don't run the test for issue #16335 when -M is not specified.
Increase memory limit in this test.

files:
  Lib/test/test_ucn.py |  6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_ucn.py b/Lib/test/test_ucn.py
--- a/Lib/test/test_ucn.py
+++ b/Lib/test/test_ucn.py
@@ -144,8 +144,12 @@
     @unittest.skipUnless(_testcapi.UINT_MAX < sys.maxint,
                          "needs UINT_MAX < sys.maxint")
     @test_support.bigmemtest(minsize=_testcapi.UINT_MAX + 1,
-                             memuse=1 + 4 // len(u'\U00010000'))
+                             memuse=2 + 4 // len(u'\U00010000'))
     def test_issue16335(self, size):
+        func = self.test_issue16335
+        if size < func.minsize:
+            raise unittest.SkipTest("not enough memory: %.1fG minimum needed" %
+                    (func.minsize * func.memuse / float(1024**3),))
         # very very long bogus character name
         x = b'\\N{SPACE' + b'x' * int(_testcapi.UINT_MAX + 1) + b'}'
         self.assertEqual(len(x), len(b'\\N{SPACE}') +

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list