summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-25 08:03:12 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-25 08:03:12 (GMT)
commit7ee79a282338e979a14d17209705a910f9965c0b (patch)
treea20041aabd4f1403f2a0c75c324b8fadaf7ba3a6
parentf4fbf24aad46622f72ba97ca6aa4a6dcbaae24a0 (diff)
downloadcpython-7ee79a282338e979a14d17209705a910f9965c0b.zip
cpython-7ee79a282338e979a14d17209705a910f9965c0b.tar.gz
cpython-7ee79a282338e979a14d17209705a910f9965c0b.tar.bz2
Don't run the test for issue #16335 when -M is not specified.
Increase memory limit in this test.
-rw-r--r--Lib/test/test_ucn.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_ucn.py b/Lib/test/test_ucn.py
index b833134..cba4f07 100644
--- a/Lib/test/test_ucn.py
+++ b/Lib/test/test_ucn.py
@@ -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}') +