mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add test
This commit is contained in:
1 parent
e4244d62d8
commit
3741321b29
1 file changed
+6
@@ -29,3 +29,9 @@ assert f'{65536:,}' == '65,536'
|
||||
assert f'{4294967296:,}' == '4,294,967,296'
|
||||
assert 'F' == "{0:{base}}".format(15, base="X")
|
||||
assert f'{255:#X}' == "0XFF"
|
||||
assert f"{65:c}" == "A"
|
||||
assert f"{0x1f5a5:c}" == "🖥"
|
||||
assert_raises(ValueError, "{:+c}".format, 1, _msg="Sign not allowed with integer format specifier 'c'")
|
||||
assert_raises(ValueError, "{:#c}".format, 1, _msg="Alternate form (#) not allowed with integer format specifier 'c'")
|
||||
# TODO: raise OverflowError
|
||||
assert_raises(ValueError, "{:c}".format, -1, _msg="%c arg not in range(0x110000)")
|
||||
Reference in new issue
Block a user