Forward port of r64958.

Added '#' formatting to integers.  This adds the 0b, 0o, or 0x prefix for bin, oct, hex.  There's still one failing case, and I need to finish the docs.  I hope to finish those today.
This commit is contained in:
Eric Smith 2008-07-15 13:02:41 +00:00
parent e840b9ad51
commit b1ebcc6b0b
3 changed files with 85 additions and 13 deletions

View file

@ -700,6 +700,10 @@ class UnicodeTest(
self.assertRaises(ValueError, format, "", "-")
self.assertRaises(ValueError, "{0:=s}".format, '')
# Alternate formatting is not supported
self.assertRaises(ValueError, format, '', '#')
self.assertRaises(ValueError, format, '', '#20')
def test_formatting(self):
string_tests.MixinStrUnicodeUserStringTest.test_formatting(self)
# Testing Unicode formatting strings...