Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc8c5abe

Browse files
committed
Add test
1 parent800d0f9 commitc8c5abe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎extra_tests/snippets/builtin_format.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,13 @@ def test_zero_padding():
3333
assertf"{0x1f5a5:c}"=="🖥"
3434
assert_raises(ValueError,"{:+c}".format,1,_msg="Sign not allowed with integer format specifier 'c'")
3535
assert_raises(ValueError,"{:#c}".format,1,_msg="Alternate form (#) not allowed with integer format specifier 'c'")
36+
assertf"{256:#010x}"=="0x00000100"
37+
assertf"{256:0=#10x}"=="0x00000100"
38+
assertf"{256:0>#10x}"=="000000x100"
39+
assertf"{256:0^#10x}"=="000x100000"
40+
assertf"{256:0<#10x}"=="0x10000000"
41+
assertf"{512:+#010x}"=="+0x0000200"
42+
assertf"{512:0=+#10x}"=="+0x0000200"
43+
assertf"{512:0>+#10x}"=="0000+0x200"
44+
assertf"{512:0^+#10x}"=="00+0x20000"
45+
assertf"{512:0<+#10x}"=="+0x2000000"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp