mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
#7000: document "sep" in capwords. Add a few tests
This commit is contained in:
parent
afdbe3d661
commit
9aac2455ab
3 changed files with 16 additions and 9 deletions
|
@ -105,6 +105,9 @@ class ModuleTest(unittest.TestCase):
|
|||
self.assertEqual(string.capwords('ABC DEF GHI'), 'Abc Def Ghi')
|
||||
self.assertEqual(string.capwords('ABC-DEF-GHI', '-'), 'Abc-Def-Ghi')
|
||||
self.assertEqual(string.capwords('ABC-def DEF-ghi GHI'), 'Abc-def Def-ghi Ghi')
|
||||
self.assertEqual(string.capwords(' aBc DeF '), 'Abc Def')
|
||||
self.assertEqual(string.capwords('\taBc\tDeF\t'), 'Abc Def')
|
||||
self.assertEqual(string.capwords('\taBc\tDeF\t', '\t'), '\tAbc\tDef\t')
|
||||
|
||||
def test_formatter(self):
|
||||
fmt = string.Formatter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue