Added tests for the isdecimal method

This commit is contained in:
ZapAnton
2019-02-03 02:05:57 +03:00
parent 46b939721f
commit 23de5581bd

View File

@@ -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"