diff options
author | Eric Smith <eric@trueblade.com> | 2008-07-15 10:10:07 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2008-07-15 10:10:07 (GMT) |
commit | d0c841243cf3966c05a98ce06dc3380a06c33679 (patch) | |
tree | e6fe5c14bb322499d3125766f7df9322beca2bdf /Lib/test/test_string.py | |
parent | a6864e0d9f1fc06c50db36ed913ac48a3d2ddde5 (diff) | |
download | cpython-d0c841243cf3966c05a98ce06dc3380a06c33679.zip cpython-d0c841243cf3966c05a98ce06dc3380a06c33679.tar.gz cpython-d0c841243cf3966c05a98ce06dc3380a06c33679.tar.bz2 |
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_string.py')
-rw-r--r-- | Lib/test/test_string.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_string.py b/Lib/test/test_string.py index 5c20a2b..20cff0a 100644 --- a/Lib/test/test_string.py +++ b/Lib/test/test_string.py @@ -192,6 +192,10 @@ class ModuleTest(unittest.TestCase): self.assertRaises(ValueError, fmt.format, "{0}", 10, 20, i=100) self.assertRaises(ValueError, fmt.format, "{i}", 10, 20, i=100) + # Alternate formatting is not supported + self.assertRaises(ValueError, format, '', '#') + self.assertRaises(ValueError, format, '', '#20') + class BytesAliasTest(unittest.TestCase): def test_builtin(self): |