Skip to content

[3.14] gh-156939: Add tests on the PyUnicode C API (#159533) - #159539

Merged
vstinner merged 1 commit into
python:3.14from
vstinner:test_unicode_capi14
Oct 16, 2026
Merged

vstinner merged 1 commit into
python:3.14from
vstinner:test_unicode_capi14

Conversation

@vstinner

Copy link
Copy Markdown
Member

(cherry picked from commit 21403af)

Add tests on functions:

  • PyUnicode_CHECK_INTERNED()
  • PyUnicode_Check()
  • PyUnicode_CheckExact()
  • PyUnicode_Equal()
  • PyUnicode_GET_LENGTH()
  • PyUnicode_IS_ASCII()
  • PyUnicode_IS_COMPACT()
  • PyUnicode_IS_COMPACT_ASCII()
  • PyUnicode_KIND()
  • PyUnicode_MAX_CHAR_VALUE()
  • PyUnicode_READ()
  • PyUnicode_READ_CHAR()
  • PyUnicode_WRITE()

Changes:

  • Add test on PyUnicode_FromOrdinal(0).
  • Require _testcapi module in test_capi.test_unicode. Since _testcapi is specific to CPython, remove @support.cpython_only.

(cherry picked from commit e8f6448) (cherry picked from commit bcbe9bc)

* pythongh-142217: Add tests on the deprecated _Py_Identifier C API (python#157638)

(cherry picked from commit 21403af)

* pythongh-156939: Add tests on the PyUnicode C API (python#157798)

Add tests on functions:

* PyUnicode_CHECK_INTERNED()
* PyUnicode_Check()
* PyUnicode_CheckExact()
* PyUnicode_Equal()
* PyUnicode_GET_LENGTH()
* PyUnicode_IS_ASCII()
* PyUnicode_IS_COMPACT()
* PyUnicode_IS_COMPACT_ASCII()
* PyUnicode_KIND()
* PyUnicode_MAX_CHAR_VALUE()
* PyUnicode_READ()
* PyUnicode_READ_CHAR()
* PyUnicode_WRITE()

Changes:

* Add test on PyUnicode_FromOrdinal(0).
* Require _testcapi module in test_capi.test_unicode. Since _testcapi
  is specific to CPython, remove @support.cpython_only.

(cherry picked from commit e8f6448)
(cherry picked from commit bcbe9bc)
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Oct 16, 2026
@vstinner vstinner removed the type-feature A feature request or enhancement label Oct 16, 2026
@vstinner
vstinner enabled auto-merge (squash) October 16, 2026 14:57
@vstinner
vstinner merged commit 21aae35 into python:3.14 Oct 16, 2026
52 of 55 checks passed
@vstinner
vstinner deleted the test_unicode_capi14 branch October 16, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant