Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test_unicode
  • Loading branch information
arihant2math committed Apr 15, 2025
commit 3a1a5d3cd02ed6c10f00e6c4f4d84524c955ff31
30 changes: 0 additions & 30 deletions Lib/test/test_unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,16 +818,6 @@ def test_isidentifier(self):
self.assertFalse("©".isidentifier())
self.assertFalse("0".isidentifier())

@support.cpython_only
@support.requires_legacy_unicode_capi()
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
def test_isidentifier_legacy(self):
u = '𝖀𝖓𝖎𝖈𝖔𝖉𝖊'
self.assertTrue(u.isidentifier())
with warnings_helper.check_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
self.assertTrue(_testcapi.unicode_legacy_string(u).isidentifier())

def test_isprintable(self):
self.assertTrue("".isprintable())
self.assertTrue(" ".isprintable())
Expand Down Expand Up @@ -2522,26 +2512,6 @@ def test_getnewargs(self):
self.assertEqual(args[0], text)
self.assertEqual(len(args), 1)

@support.cpython_only
@support.requires_legacy_unicode_capi()
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
def test_resize(self):
for length in range(1, 100, 7):
# generate a fresh string (refcount=1)
text = 'a' * length + 'b'

# fill wstr internal field
with self.assertWarns(DeprecationWarning):
abc = _testcapi.getargs_u(text)
self.assertEqual(abc, text)

# resize text: wstr field must be cleared and then recomputed
text += 'c'
with self.assertWarns(DeprecationWarning):
abcdef = _testcapi.getargs_u(text)
self.assertNotEqual(abc, abcdef)
self.assertEqual(abcdef, text)

def test_compare(self):
# Issue #17615
N = 10
Expand Down