mirror of
https://github.com/python/cpython.git
synced 2025-10-14 10:53:40 +00:00
bpo-45668: Fix PGO tests without test extensions (GH-29315)
This commit is contained in:
parent
762a4dc936
commit
e73283a20f
13 changed files with 60 additions and 28 deletions
|
@ -31,7 +31,10 @@ from datetime import timezone
|
||||||
from datetime import date, datetime
|
from datetime import date, datetime
|
||||||
import time as _time
|
import time as _time
|
||||||
|
|
||||||
import _testcapi
|
try:
|
||||||
|
import _testcapi
|
||||||
|
except ImportError:
|
||||||
|
_testcapi = None
|
||||||
|
|
||||||
# Needed by test_datetime
|
# Needed by test_datetime
|
||||||
import _strptime
|
import _strptime
|
||||||
|
@ -5918,6 +5921,7 @@ class IranTest(ZoneInfoTest):
|
||||||
zonename = 'Asia/Tehran'
|
zonename = 'Asia/Tehran'
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
class CapiTest(unittest.TestCase):
|
class CapiTest(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
# Since the C API is not present in the _Pure tests, skip all tests
|
# Since the C API is not present in the _Pure tests, skip all tests
|
||||||
|
|
|
@ -4,6 +4,7 @@ Common tests shared by test_unicode, test_userstring and test_bytes.
|
||||||
|
|
||||||
import unittest, string, sys, struct
|
import unittest, string, sys, struct
|
||||||
from test import support
|
from test import support
|
||||||
|
from test.support import import_helper
|
||||||
from collections import UserList
|
from collections import UserList
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
@ -1328,17 +1329,17 @@ class MixinStrUnicodeUserStringTest:
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
def test_formatting_c_limits(self):
|
def test_formatting_c_limits(self):
|
||||||
from _testcapi import PY_SSIZE_T_MAX, INT_MAX, UINT_MAX
|
_testcapi = import_helper.import_module('_testcapi')
|
||||||
SIZE_MAX = (1 << (PY_SSIZE_T_MAX.bit_length() + 1)) - 1
|
SIZE_MAX = (1 << (_testcapi.PY_SSIZE_T_MAX.bit_length() + 1)) - 1
|
||||||
self.checkraises(OverflowError, '%*s', '__mod__',
|
self.checkraises(OverflowError, '%*s', '__mod__',
|
||||||
(PY_SSIZE_T_MAX + 1, ''))
|
(_testcapi.PY_SSIZE_T_MAX + 1, ''))
|
||||||
self.checkraises(OverflowError, '%.*f', '__mod__',
|
self.checkraises(OverflowError, '%.*f', '__mod__',
|
||||||
(INT_MAX + 1, 1. / 7))
|
(_testcapi.INT_MAX + 1, 1. / 7))
|
||||||
# Issue 15989
|
# Issue 15989
|
||||||
self.checkraises(OverflowError, '%*s', '__mod__',
|
self.checkraises(OverflowError, '%*s', '__mod__',
|
||||||
(SIZE_MAX + 1, ''))
|
(SIZE_MAX + 1, ''))
|
||||||
self.checkraises(OverflowError, '%.*f', '__mod__',
|
self.checkraises(OverflowError, '%.*f', '__mod__',
|
||||||
(UINT_MAX + 1, 1. / 7))
|
(_testcapi.UINT_MAX + 1, 1. / 7))
|
||||||
|
|
||||||
def test_floatformatting(self):
|
def test_floatformatting(self):
|
||||||
# float formatting
|
# float formatting
|
||||||
|
|
|
@ -444,7 +444,10 @@ def requires_lzma(reason='requires lzma'):
|
||||||
return unittest.skipUnless(lzma, reason)
|
return unittest.skipUnless(lzma, reason)
|
||||||
|
|
||||||
def has_no_debug_ranges():
|
def has_no_debug_ranges():
|
||||||
import _testinternalcapi
|
try:
|
||||||
|
import _testinternalcapi
|
||||||
|
except ImportError:
|
||||||
|
raise unittest.SkipTest("_testinternalcapi required")
|
||||||
config = _testinternalcapi.get_config()
|
config = _testinternalcapi.get_config()
|
||||||
return bool(config['no_debug_ranges'])
|
return bool(config['no_debug_ranges'])
|
||||||
|
|
||||||
|
@ -692,7 +695,10 @@ _TPFLAGS_HAVE_GC = 1<<14
|
||||||
_TPFLAGS_HEAPTYPE = 1<<9
|
_TPFLAGS_HEAPTYPE = 1<<9
|
||||||
|
|
||||||
def check_sizeof(test, o, size):
|
def check_sizeof(test, o, size):
|
||||||
import _testinternalcapi
|
try:
|
||||||
|
import _testinternalcapi
|
||||||
|
except ImportError:
|
||||||
|
raise unittest.SkipTest("_testinternalcapi required")
|
||||||
result = sys.getsizeof(o)
|
result = sys.getsizeof(o)
|
||||||
# add GC header size
|
# add GC header size
|
||||||
if ((type(o) == type) and (o.__flags__ & _TPFLAGS_HEAPTYPE) or\
|
if ((type(o) == type) and (o.__flags__ & _TPFLAGS_HEAPTYPE) or\
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
import collections.abc
|
import collections.abc
|
||||||
import unittest
|
import unittest
|
||||||
from test import support
|
from test import support
|
||||||
|
from test.support import import_helper
|
||||||
from test.support import os_helper
|
from test.support import os_helper
|
||||||
from test.support import _2G
|
from test.support import _2G
|
||||||
import weakref
|
import weakref
|
||||||
|
@ -1147,9 +1148,9 @@ class BaseTest:
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
def test_obsolete_write_lock(self):
|
def test_obsolete_write_lock(self):
|
||||||
from _testcapi import getbuffer_with_null_view
|
_testcapi = import_helper.import_module('_testcapi')
|
||||||
a = array.array('B', b"")
|
a = array.array('B', b"")
|
||||||
self.assertRaises(BufferError, getbuffer_with_null_view, a)
|
self.assertRaises(BufferError, _testcapi.getbuffer_with_null_view, a)
|
||||||
|
|
||||||
def test_free_after_iterating(self):
|
def test_free_after_iterating(self):
|
||||||
support.check_free_after_iterating(self, iter, array.array,
|
support.check_free_after_iterating(self, iter, array.array,
|
||||||
|
|
|
@ -1650,8 +1650,8 @@ class ByteArrayTest(BaseBytesTest, unittest.TestCase):
|
||||||
|
|
||||||
@test.support.cpython_only
|
@test.support.cpython_only
|
||||||
def test_obsolete_write_lock(self):
|
def test_obsolete_write_lock(self):
|
||||||
from _testcapi import getbuffer_with_null_view
|
_testcapi = import_helper.import_module('_testcapi')
|
||||||
self.assertRaises(BufferError, getbuffer_with_null_view, bytearray())
|
self.assertRaises(BufferError, _testcapi.getbuffer_with_null_view, bytearray())
|
||||||
|
|
||||||
def test_iterator_pickling2(self):
|
def test_iterator_pickling2(self):
|
||||||
orig = bytearray(b'abc')
|
orig = bytearray(b'abc')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from test.support import requires_IEEE_754, cpython_only
|
from test.support import requires_IEEE_754, cpython_only, import_helper
|
||||||
from test.test_math import parse_testfile, test_file
|
from test.test_math import parse_testfile, test_file
|
||||||
import test.test_math as test_math
|
import test.test_math as test_math
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -452,13 +452,13 @@ class CMathTests(unittest.TestCase):
|
||||||
@cpython_only
|
@cpython_only
|
||||||
def test_polar_errno(self):
|
def test_polar_errno(self):
|
||||||
# Issue #24489: check a previously set C errno doesn't disturb polar()
|
# Issue #24489: check a previously set C errno doesn't disturb polar()
|
||||||
from _testcapi import set_errno
|
_testcapi = import_helper.import_module('_testcapi')
|
||||||
def polar_with_errno_set(z):
|
def polar_with_errno_set(z):
|
||||||
set_errno(11)
|
_testcapi.set_errno(11)
|
||||||
try:
|
try:
|
||||||
return polar(z)
|
return polar(z)
|
||||||
finally:
|
finally:
|
||||||
set_errno(0)
|
_testcapi.set_errno(0)
|
||||||
self.check_polar(polar_with_errno_set)
|
self.check_polar(polar_with_errno_set)
|
||||||
|
|
||||||
def test_phase(self):
|
def test_phase(self):
|
||||||
|
|
|
@ -1970,6 +1970,7 @@ class BasicUnicodeTest(unittest.TestCase, MixInCheckStateHandling):
|
||||||
"encoding=%r" % encoding)
|
"encoding=%r" % encoding)
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_basics_capi(self):
|
def test_basics_capi(self):
|
||||||
s = "abc123" # all codecs should be able to encode these
|
s = "abc123" # all codecs should be able to encode these
|
||||||
for encoding in all_unicode_encodings:
|
for encoding in all_unicode_encodings:
|
||||||
|
|
|
@ -8,6 +8,7 @@ import sys
|
||||||
import unittest
|
import unittest
|
||||||
import weakref
|
import weakref
|
||||||
from test import support
|
from test import support
|
||||||
|
from test.support import import_helper
|
||||||
|
|
||||||
|
|
||||||
class DictTest(unittest.TestCase):
|
class DictTest(unittest.TestCase):
|
||||||
|
@ -1541,7 +1542,8 @@ class CAPITest(unittest.TestCase):
|
||||||
# Test _PyDict_GetItem_KnownHash()
|
# Test _PyDict_GetItem_KnownHash()
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
def test_getitem_knownhash(self):
|
def test_getitem_knownhash(self):
|
||||||
from _testcapi import dict_getitem_knownhash
|
_testcapi = import_helper.import_module('_testcapi')
|
||||||
|
dict_getitem_knownhash = _testcapi.dict_getitem_knownhash
|
||||||
|
|
||||||
d = {'x': 1, 'y': 2, 'z': 3}
|
d = {'x': 1, 'y': 2, 'z': 3}
|
||||||
self.assertEqual(dict_getitem_knownhash(d, 'x', hash('x')), 1)
|
self.assertEqual(dict_getitem_knownhash(d, 'x', hash('x')), 1)
|
||||||
|
|
|
@ -1494,6 +1494,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
||||||
class SetConfigTests(unittest.TestCase):
|
class SetConfigTests(unittest.TestCase):
|
||||||
def test_set_config(self):
|
def test_set_config(self):
|
||||||
# bpo-42260: Test _PyInterpreterState_SetConfig()
|
# bpo-42260: Test _PyInterpreterState_SetConfig()
|
||||||
|
import_helper.import_module('_testcapi')
|
||||||
cmd = [sys.executable, '-I', '-m', 'test._test_embed_set_config']
|
cmd = [sys.executable, '-I', '-m', 'test._test_embed_set_config']
|
||||||
proc = subprocess.run(cmd,
|
proc = subprocess.run(cmd,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
|
|
|
@ -8,6 +8,7 @@ import time
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from test import support
|
from test import support
|
||||||
|
from test.support import import_helper
|
||||||
from test.test_grammar import (VALID_UNDERSCORE_LITERALS,
|
from test.test_grammar import (VALID_UNDERSCORE_LITERALS,
|
||||||
INVALID_UNDERSCORE_LITERALS)
|
INVALID_UNDERSCORE_LITERALS)
|
||||||
from math import isinf, isnan, copysign, ldexp
|
from math import isinf, isnan, copysign, ldexp
|
||||||
|
@ -714,7 +715,7 @@ class IEEEFormatTestCase(unittest.TestCase):
|
||||||
|
|
||||||
@support.requires_IEEE_754
|
@support.requires_IEEE_754
|
||||||
def test_serialized_float_rounding(self):
|
def test_serialized_float_rounding(self):
|
||||||
from _testcapi import FLT_MAX
|
FLT_MAX = import_helper.import_module('_testcapi').FLT_MAX
|
||||||
self.assertEqual(struct.pack("<f", 3.40282356e38), struct.pack("<f", FLT_MAX))
|
self.assertEqual(struct.pack("<f", 3.40282356e38), struct.pack("<f", FLT_MAX))
|
||||||
self.assertEqual(struct.pack("<f", -3.40282356e38), struct.pack("<f", -FLT_MAX))
|
self.assertEqual(struct.pack("<f", -3.40282356e38), struct.pack("<f", -FLT_MAX))
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import struct
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from test import support
|
from test import support
|
||||||
|
from test.support import import_helper
|
||||||
from test.support.script_helper import assert_python_ok
|
from test.support.script_helper import assert_python_ok
|
||||||
|
|
||||||
ISBIGENDIAN = sys.byteorder == "big"
|
ISBIGENDIAN = sys.byteorder == "big"
|
||||||
|
@ -680,8 +681,8 @@ class StructTest(unittest.TestCase):
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
def test_issue45034_unsigned(self):
|
def test_issue45034_unsigned(self):
|
||||||
from _testcapi import USHRT_MAX
|
_testcapi = import_helper.import_module('_testcapi')
|
||||||
error_msg = f'ushort format requires 0 <= number <= {USHRT_MAX}'
|
error_msg = f'ushort format requires 0 <= number <= {_testcapi.USHRT_MAX}'
|
||||||
with self.assertRaisesRegex(struct.error, error_msg):
|
with self.assertRaisesRegex(struct.error, error_msg):
|
||||||
struct.pack('H', 70000) # too large
|
struct.pack('H', 70000) # too large
|
||||||
with self.assertRaisesRegex(struct.error, error_msg):
|
with self.assertRaisesRegex(struct.error, error_msg):
|
||||||
|
@ -689,8 +690,8 @@ class StructTest(unittest.TestCase):
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
def test_issue45034_signed(self):
|
def test_issue45034_signed(self):
|
||||||
from _testcapi import SHRT_MIN, SHRT_MAX
|
_testcapi = import_helper.import_module('_testcapi')
|
||||||
error_msg = f'short format requires {SHRT_MIN} <= number <= {SHRT_MAX}'
|
error_msg = f'short format requires {_testcapi.SHRT_MIN} <= number <= {_testcapi.SHRT_MAX}'
|
||||||
with self.assertRaisesRegex(struct.error, error_msg):
|
with self.assertRaisesRegex(struct.error, error_msg):
|
||||||
struct.pack('h', 70000) # too large
|
struct.pack('h', 70000) # too large
|
||||||
with self.assertRaisesRegex(struct.error, error_msg):
|
with self.assertRaisesRegex(struct.error, error_msg):
|
||||||
|
|
|
@ -20,6 +20,11 @@ from test.support import warnings_helper
|
||||||
from test import support, string_tests
|
from test import support, string_tests
|
||||||
from test.support.script_helper import assert_python_failure
|
from test.support.script_helper import assert_python_failure
|
||||||
|
|
||||||
|
try:
|
||||||
|
import _testcapi
|
||||||
|
except ImportError:
|
||||||
|
_testcapi = None
|
||||||
|
|
||||||
# Error handling (bad decoder return)
|
# Error handling (bad decoder return)
|
||||||
def search_function(encoding):
|
def search_function(encoding):
|
||||||
def decode1(input, errors="strict"):
|
def decode1(input, errors="strict"):
|
||||||
|
@ -749,8 +754,8 @@ class UnicodeTest(string_tests.CommonTest,
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
@support.requires_legacy_unicode_capi
|
@support.requires_legacy_unicode_capi
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_isidentifier_legacy(self):
|
def test_isidentifier_legacy(self):
|
||||||
import _testcapi
|
|
||||||
u = '𝖀𝖓𝖎𝖈𝖔𝖉𝖊'
|
u = '𝖀𝖓𝖎𝖈𝖔𝖉𝖊'
|
||||||
self.assertTrue(u.isidentifier())
|
self.assertTrue(u.isidentifier())
|
||||||
with warnings_helper.check_warnings():
|
with warnings_helper.check_warnings():
|
||||||
|
@ -1529,9 +1534,9 @@ class UnicodeTest(string_tests.CommonTest,
|
||||||
"Success, self.__rmod__('lhs %% %r') was called")
|
"Success, self.__rmod__('lhs %% %r') was called")
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_formatting_huge_precision_c_limits(self):
|
def test_formatting_huge_precision_c_limits(self):
|
||||||
from _testcapi import INT_MAX
|
format_string = "%.{}f".format(_testcapi.INT_MAX + 1)
|
||||||
format_string = "%.{}f".format(INT_MAX + 1)
|
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
result = format_string % 2.34
|
result = format_string % 2.34
|
||||||
|
|
||||||
|
@ -2387,21 +2392,21 @@ class UnicodeTest(string_tests.CommonTest,
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
@support.requires_legacy_unicode_capi
|
@support.requires_legacy_unicode_capi
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_resize(self):
|
def test_resize(self):
|
||||||
from _testcapi import getargs_u
|
|
||||||
for length in range(1, 100, 7):
|
for length in range(1, 100, 7):
|
||||||
# generate a fresh string (refcount=1)
|
# generate a fresh string (refcount=1)
|
||||||
text = 'a' * length + 'b'
|
text = 'a' * length + 'b'
|
||||||
|
|
||||||
# fill wstr internal field
|
# fill wstr internal field
|
||||||
with self.assertWarns(DeprecationWarning):
|
with self.assertWarns(DeprecationWarning):
|
||||||
abc = getargs_u(text)
|
abc = _testcapi.getargs_u(text)
|
||||||
self.assertEqual(abc, text)
|
self.assertEqual(abc, text)
|
||||||
|
|
||||||
# resize text: wstr field must be cleared and then recomputed
|
# resize text: wstr field must be cleared and then recomputed
|
||||||
text += 'c'
|
text += 'c'
|
||||||
with self.assertWarns(DeprecationWarning):
|
with self.assertWarns(DeprecationWarning):
|
||||||
abcdef = getargs_u(text)
|
abcdef = _testcapi.getargs_u(text)
|
||||||
self.assertNotEqual(abc, abcdef)
|
self.assertNotEqual(abc, abcdef)
|
||||||
self.assertEqual(abcdef, text)
|
self.assertEqual(abcdef, text)
|
||||||
|
|
||||||
|
@ -2789,6 +2794,7 @@ class CAPITest(unittest.TestCase):
|
||||||
|
|
||||||
# Test PyUnicode_AsWideChar()
|
# Test PyUnicode_AsWideChar()
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_aswidechar(self):
|
def test_aswidechar(self):
|
||||||
from _testcapi import unicode_aswidechar
|
from _testcapi import unicode_aswidechar
|
||||||
import_helper.import_module('ctypes')
|
import_helper.import_module('ctypes')
|
||||||
|
@ -2827,6 +2833,7 @@ class CAPITest(unittest.TestCase):
|
||||||
|
|
||||||
# Test PyUnicode_AsWideCharString()
|
# Test PyUnicode_AsWideCharString()
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_aswidecharstring(self):
|
def test_aswidecharstring(self):
|
||||||
from _testcapi import unicode_aswidecharstring
|
from _testcapi import unicode_aswidecharstring
|
||||||
import_helper.import_module('ctypes')
|
import_helper.import_module('ctypes')
|
||||||
|
@ -2851,6 +2858,7 @@ class CAPITest(unittest.TestCase):
|
||||||
|
|
||||||
# Test PyUnicode_AsUCS4()
|
# Test PyUnicode_AsUCS4()
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_asucs4(self):
|
def test_asucs4(self):
|
||||||
from _testcapi import unicode_asucs4
|
from _testcapi import unicode_asucs4
|
||||||
for s in ['abc', '\xa1\xa2', '\u4f60\u597d', 'a\U0001f600',
|
for s in ['abc', '\xa1\xa2', '\u4f60\u597d', 'a\U0001f600',
|
||||||
|
@ -2868,6 +2876,7 @@ class CAPITest(unittest.TestCase):
|
||||||
|
|
||||||
# Test PyUnicode_AsUTF8()
|
# Test PyUnicode_AsUTF8()
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_asutf8(self):
|
def test_asutf8(self):
|
||||||
from _testcapi import unicode_asutf8
|
from _testcapi import unicode_asutf8
|
||||||
|
|
||||||
|
@ -2882,6 +2891,7 @@ class CAPITest(unittest.TestCase):
|
||||||
|
|
||||||
# Test PyUnicode_AsUTF8AndSize()
|
# Test PyUnicode_AsUTF8AndSize()
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_asutf8andsize(self):
|
def test_asutf8andsize(self):
|
||||||
from _testcapi import unicode_asutf8andsize
|
from _testcapi import unicode_asutf8andsize
|
||||||
|
|
||||||
|
@ -2896,6 +2906,7 @@ class CAPITest(unittest.TestCase):
|
||||||
|
|
||||||
# Test PyUnicode_FindChar()
|
# Test PyUnicode_FindChar()
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_findchar(self):
|
def test_findchar(self):
|
||||||
from _testcapi import unicode_findchar
|
from _testcapi import unicode_findchar
|
||||||
|
|
||||||
|
@ -2919,6 +2930,7 @@ class CAPITest(unittest.TestCase):
|
||||||
|
|
||||||
# Test PyUnicode_CopyCharacters()
|
# Test PyUnicode_CopyCharacters()
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_copycharacters(self):
|
def test_copycharacters(self):
|
||||||
from _testcapi import unicode_copycharacters
|
from _testcapi import unicode_copycharacters
|
||||||
|
|
||||||
|
@ -2961,6 +2973,7 @@ class CAPITest(unittest.TestCase):
|
||||||
self.assertRaises(SystemError, unicode_copycharacters, s, 0, b'', 0, 0)
|
self.assertRaises(SystemError, unicode_copycharacters, s, 0, b'', 0, 0)
|
||||||
|
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
|
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||||
def test_pep393_utf8_caching_bug(self):
|
def test_pep393_utf8_caching_bug(self):
|
||||||
# Issue #25709: Problem with string concatenation and utf-8 cache
|
# Issue #25709: Problem with string concatenation and utf-8 cache
|
||||||
from _testcapi import getargs_s_hash
|
from _testcapi import getargs_s_hash
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
PGO tests now pass when Python is built without test extension modules.
|
Loading…
Add table
Add a link
Reference in a new issue