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
add test for py str upper() and lower()
  • Loading branch information
wdq112 committed Feb 26, 2024
commit e40546f61f13257d3f90bee28874e7e40e7b4098
8 changes: 8 additions & 0 deletions py/tests/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,14 @@ def index(s, i):
assert a.lstrip("a ") == "bada a"
assert a.strip("a ") == "bad"

doc="upper"
a = "abc"
assert a.upper() == "ABC"

doc="lower"
a = "ABC"
assert a.lower() == "abc"

class Index:
def __index__(self):
return 1
Expand Down