Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-99593: Add tests for Unicode C API #99594

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Nov 19, 2022

@serhiy-storchaka
Copy link
Member Author

serhiy-storchaka commented Nov 19, 2022

I have found a bug during testing. I'll extract it into a separate issue later.

I'll write the remaining tests after some rest.

Copy link
Member

@vstinner vstinner left a comment

If you want me to review this PR, can you please split it into smaller PR? Like start with a shorter PR, wait until it's merged, then move to the next one.

@serhiy-storchaka
Copy link
Member Author

serhiy-storchaka commented Nov 21, 2022

I'll split it on three parts:

  • higher-level C API corresponding to str methods
  • lower-level C API
  • codecs

@vstinner
Copy link
Member

vstinner commented Nov 21, 2022

I'll split it on three parts:

Are you talking about creating 3 PRs modifying the same files, or do you consider to have separated C and Python files for "higher-level C API corresponding to str methods"? Maybe it's just fine to put most "unicode" tests in "unicode.c" and "unicode.py" tests.

@serhiy-storchaka
Copy link
Member Author

serhiy-storchaka commented Nov 21, 2022

As you suggested, I'll add codecs tests in a separate Python file. The rest of tests will be in Lib/test/test_capi/test_unicode.py.

All wrappers will be defined in Modules/_testcapi/unicode.c. It is nice that it was separated from _testcapi.c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants