diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2009-09-26 12:27:13 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2009-09-26 12:27:13 (GMT) |
commit | 2dcd4c5a0f5fba4a1e34e4a902971c2e4ce7349f (patch) | |
tree | 99f7ba4b37dd1bdc9df7111d156c9b6719d91dc7 /Lib/test | |
parent | 6e52a5a8376579cc195ba411f2f3e556286fb0f2 (diff) | |
download | cpython-2dcd4c5a0f5fba4a1e34e4a902971c2e4ce7349f.zip cpython-2dcd4c5a0f5fba4a1e34e4a902971c2e4ce7349f.tar.gz cpython-2dcd4c5a0f5fba4a1e34e4a902971c2e4ce7349f.tar.bz2 |
Merged revisions 75072 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r75072 | ezio.melotti | 2009-09-26 15:19:30 +0300 (Sat, 26 Sep 2009) | 1 line
string.capwords is still around, adding back the tests
........
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_string.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_string.py b/Lib/test/test_string.py index 16d1edb..743fa6b 100644 --- a/Lib/test/test_string.py +++ b/Lib/test/test_string.py @@ -15,6 +15,14 @@ class ModuleTest(unittest.TestCase): string.punctuation string.printable + def test_capwords(self): + self.assertEqual(string.capwords('abc def ghi'), 'Abc Def Ghi') + self.assertEqual(string.capwords('abc\tdef\nghi'), 'Abc Def Ghi') + self.assertEqual(string.capwords('abc\t def \nghi'), 'Abc Def Ghi') + 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') + def test_formatter(self): fmt = string.Formatter() self.assertEqual(fmt.format("foo"), "foo") |