summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-21 18:27:17 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-21 18:27:17 (GMT)
commit529230142ffec0f41fec79226a7d7784cbda3eaf (patch)
treec46bba77a8d841e01da269d0b3700558264f9f43 /Lib
parent014791f8484036b1c0040ea0de7a6a4c05f0aeed (diff)
parente45dac4ea94a93b6bc12376100e04a5b3330ffa6 (diff)
downloadcpython-529230142ffec0f41fec79226a7d7784cbda3eaf.zip
cpython-529230142ffec0f41fec79226a7d7784cbda3eaf.tar.gz
cpython-529230142ffec0f41fec79226a7d7784cbda3eaf.tar.bz2
Use bigmemtest decorator for test of issue #16335.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ucn.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/Lib/test/test_ucn.py b/Lib/test/test_ucn.py
index 05557ae..f949761 100644
--- a/Lib/test/test_ucn.py
+++ b/Lib/test/test_ucn.py
@@ -218,18 +218,17 @@ class UnicodeNamesTest(unittest.TestCase):
@unittest.skipUnless(_testcapi.INT_MAX < _testcapi.PY_SSIZE_T_MAX,
"needs UINT_MAX < SIZE_MAX")
- def test_issue16335(self):
+ @support.bigmemtest(size=_testcapi.UINT_MAX + 1,
+ memuse=1 + 1, dry_run=False)
+ def test_issue16335(self, size):
# very very long bogus character name
- try:
- x = b'\\N{SPACE' + b'x' * (_testcapi.UINT_MAX + 1) + b'}'
- self.assertEqual(len(x), len(b'\\N{SPACE}') +
- (_testcapi.UINT_MAX + 1))
- self.assertRaisesRegex(UnicodeError,
- 'unknown Unicode character name',
- x.decode, 'unicode-escape'
- )
- except MemoryError:
- raise unittest.SkipTest("not enough memory")
+ x = b'\\N{SPACE' + b'x' * (_testcapi.UINT_MAX + 1) + b'}'
+ self.assertEqual(len(x), len(b'\\N{SPACE}') +
+ (_testcapi.UINT_MAX + 1))
+ self.assertRaisesRegex(UnicodeError,
+ 'unknown Unicode character name',
+ x.decode, 'unicode-escape'
+ )
def test_main():