]> granicus.if.org Git - python/commitdiff
Don't run the test for issue #16335 when -M is not specified.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 25 Jan 2013 08:03:12 +0000 (10:03 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 25 Jan 2013 08:03:12 +0000 (10:03 +0200)
Increase memory limit in this test.

Lib/test/test_ucn.py

index b833134a84a1ecb041f76af9bbd860ef20d99df7..cba4f078befe0a98f208906e3cab536586a86e33 100644 (file)
@@ -144,8 +144,12 @@ class UnicodeNamesTest(unittest.TestCase):
     @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}') +