mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Added format tests.
Fixed bug in alignment of negative numbers. Whitespace normalization.
This commit is contained in:
parent
bc3b345f82
commit
185e30cdf3
4 changed files with 36 additions and 24 deletions
|
@ -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(), "")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue