summaryrefslogtreecommitdiff
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2008-07-15 13:02:41 +0000
committerEric Smith <eric@trueblade.com>2008-07-15 13:02:41 +0000
commitb1ebcc6b0b2dfee5c7e412b3e1875290213ea4aa (patch)
tree526c3d2cbcd3aeb8e537bbe941d82fb97cb0b4da /Lib/test/test_unicode.py
parente840b9ad510cf7034f08b1b1527a790be708e414 (diff)
downloadcpython-git-b1ebcc6b0b2dfee5c7e412b3e1875290213ea4aa.tar.gz
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.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index fb904bf2a4..e6b3cb0bed 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -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...