Changeset 391 for python/trunk/Lib/test/test_ucn.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/test/test_ucn.py
r2 r391 9 9 10 10 import unittest 11 import sys 12 import _testcapi 11 13 12 14 from test import test_support … … 138 140 ) 139 141 142 @unittest.skipUnless(_testcapi.INT_MAX < _testcapi.PY_SSIZE_T_MAX, 143 "needs UINT_MAX < SIZE_MAX") 144 @unittest.skipUnless(_testcapi.UINT_MAX < sys.maxint, 145 "needs UINT_MAX < sys.maxint") 146 @test_support.bigmemtest(minsize=_testcapi.UINT_MAX + 1, 147 memuse=2 + 4 // len(u'\U00010000')) 148 def test_issue16335(self, size): 149 func = self.test_issue16335 150 if size < func.minsize: 151 raise unittest.SkipTest("not enough memory: %.1fG minimum needed" % 152 (func.minsize * func.memuse / float(1024**3),)) 153 # very very long bogus character name 154 x = b'\\N{SPACE' + b'x' * int(_testcapi.UINT_MAX + 1) + b'}' 155 self.assertEqual(len(x), len(b'\\N{SPACE}') + 156 (_testcapi.UINT_MAX + 1)) 157 self.assertRaisesRegexp(UnicodeError, 158 'unknown Unicode character name', 159 x.decode, 'unicode-escape' 160 ) 161 162 140 163 def test_main(): 141 164 test_support.run_unittest(UnicodeNamesTest)
Note:
See TracChangeset
for help on using the changeset viewer.