[Python-checkins] cpython (merge 3.3 -> default): Use bigmemtest decorator for test of issue #16335.
serhiy.storchaka
python-checkins at python.org
Mon Jan 21 19:30:10 CET 2013
http://hg.python.org/cpython/rev/cdd1e60d31e5
changeset: 81636:cdd1e60d31e5
parent: 81632:5faae2bdf1e0
parent: 81635:0e622d2cbcf8
user: Serhiy Storchaka <storchaka at gmail.com>
date: Mon Jan 21 20:28:02 2013 +0200
summary:
Use bigmemtest decorator for test of issue #16335.
files:
Lib/test/test_ucn.py | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 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
@@ -218,18 +218,17 @@
@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():
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list