diff options
Diffstat (limited to 'Lib/test/test_format.py')
-rw-r--r-- | Lib/test/test_format.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 6a60603..ce5d5f2 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -164,6 +164,22 @@ testboth("%d", 42, "42") testboth("%d", -42, "-42") testboth("%d", 42L, "42") testboth("%d", -42L, "-42") +testboth("%#x", 1, "0x1") +testboth("%#x", 1L, "0x1") +testboth("%#X", 1, "0X1") +testboth("%#X", 1L, "0X1") +testboth("%#o", 1, "01") +testboth("%#o", 1L, "01") +testboth("%#o", 0, "0") +testboth("%#o", 0L, "0") +testboth("%o", 0, "0") +testboth("%o", 0L, "0") +testboth("%d", 0, "0") +testboth("%d", 0L, "0") +testboth("%#x", 0, "0") +testboth("%#x", 0L, "0") +testboth("%#X", 0, "0") +testboth("%#X", 0L, "0") testboth("%x", 0x42, "42") # testboth("%x", -0x42, "ffffffbe") # Alas, that's specific to 32-bit machines |