-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[mypyc] Implement str.lower() and str.upper() primitive
#19375
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
Changes from 2 commits
d4ef31a
124dceb
8065f9c
1d40499
2750549
62520ef
cc2ed14
5cdca5a
7049d8b
bd4bde2
b8fe8f5
ea78a12
86abdde
2ae0353
bb9ba27
e1f1147
cffdc23
5589a5c
0890ff7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -906,3 +906,21 @@ def test_count_multi_start_end_emoji() -> None: | |
| assert string.count("😴😴😴", 0, 12) == 1, string.count("😴😴😴", 0, 12) | ||
| assert string.count("🚀🚀🚀", 0, 12) == 2, string.count("🚀🚀🚀", 0, 12) | ||
| assert string.count("ñññ", 0, 12) == 1, string.count("ñññ", 0, 12) | ||
|
|
||
| [case testLower] | ||
| def test_str_lower() -> None: | ||
| assert "".lower() == "" | ||
| assert "ABC".lower() == "abc" | ||
| assert "abc".lower() == "abc" | ||
| assert "AbC123".lower() == "abc123" | ||
| assert "áÉÍ".lower() == "áéí" | ||
| assert "😴🚀".lower() == "😴🚀" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also test special cases (verify that this agrees with normal Python semantics):
|
||
|
|
||
| [case testUpper] | ||
| def test_str_upper() -> None: | ||
| assert "".upper() == "" | ||
| assert "abc".upper() == "ABC" | ||
| assert "ABC".upper() == "ABC" | ||
| assert "AbC123".upper() == "ABC123" | ||
| assert "áéí".upper() == "ÁÉÍ" | ||
| assert "😴🚀".upper() == "😴🚀" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also test special case (verify that this agrees with normal Python semantics):
|
||
Uh oh!
There was an error while loading. Please reload this page.