Added format tests.

Fixed bug in alignment of negative numbers.
Whitespace normalization.
This commit is contained in:
Eric Smith 2007-08-30 22:23:08 +00:00
parent bc3b345f82
commit 185e30cdf3
4 changed files with 36 additions and 24 deletions

View file

@ -540,6 +540,7 @@ class BuiltinTest(unittest.TestCase):
self.assertEqual(format(3.1415e-104, ""), str(3.1415e-104))
self.assertEqual(format(-3.1415e-104, ""), str(-3.1415e-104))
self.assertEqual(format(object, ""), str(object))
self.assertEqual(format(None, ""), str(None))
# TypeError because self.__format__ returns the wrong type
self.assertRaises(TypeError, format, H(), "")