mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Added tests for the isdecimal method
This commit is contained in:
@@ -35,6 +35,7 @@ assert not a.endswith('on')
|
||||
assert a.zfill(8) == '000Hallo'
|
||||
assert a.isalnum()
|
||||
assert not a.isdigit()
|
||||
assert not a.isdecimal()
|
||||
assert not a.isnumeric()
|
||||
assert a.istitle()
|
||||
assert a.isalpha()
|
||||
@@ -65,6 +66,9 @@ assert '-'.join(['1', '2', '3']) == '1-2-3'
|
||||
assert 'HALLO'.isupper()
|
||||
assert "hello, my name is".partition("my ") == ('hello, ', 'my ', 'name is')
|
||||
assert "hello, my name is".rpartition("is") == ('hello, my name ', 'is', '')
|
||||
assert not ''.isdecimal()
|
||||
assert '123'.isdecimal()
|
||||
assert not '\u00B2'.isdecimal()
|
||||
|
||||
# String Formatting
|
||||
assert "{} {}".format(1,2) == "1 2"
|
||||
|
||||
Reference in New Issue
Block a user