-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[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
base: master
Are you sure you want to change the base?
Changes from 2 commits
d4ef31a
124dceb
8065f9c
1d40499
2750549
62520ef
cc2ed14
5cdca5a
7049d8b
bd4bde2
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() == "😴🚀" | ||
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() == "😴🚀" | ||
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.