diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-08-15 06:26:28 (GMT) |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-08-15 06:26:28 (GMT) |
| commit | 269e3ee3db73bcef5465b36a24b9b774dd8923ec (patch) | |
| tree | d221fe0f27bd2d8a69bdda70d2db3d200fe4d283 /Lib/test/string_tests.py | |
| parent | 7ec7fc4c3b67f77654b6964a37500d1421dc7f04 (diff) | |
| parent | ee8d998ecfd7d7fec71610adef1127d6d95ca843 (diff) | |
| download | cpython-269e3ee3db73bcef5465b36a24b9b774dd8923ec.zip cpython-269e3ee3db73bcef5465b36a24b9b774dd8923ec.tar.gz cpython-269e3ee3db73bcef5465b36a24b9b774dd8923ec.tar.bz2 | |
#12266: merge with 3.2.
Diffstat (limited to 'Lib/test/string_tests.py')
| -rw-r--r-- | Lib/test/string_tests.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index fca38c3..d792529 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -641,6 +641,23 @@ class CommonTest(BaseTest): self.checkequal('Aaaa', 'aaaa', 'capitalize') self.checkequal('Aaaa', 'AaAa', 'capitalize') + # check that titlecased chars are lowered correctly + # \u1ffc is the titlecased char + self.checkequal('\u1ffc\u1ff3\u1ff3\u1ff3', + '\u1ff3\u1ff3\u1ffc\u1ffc', 'capitalize') + # check with cased non-letter chars + self.checkequal('\u24c5\u24e8\u24e3\u24d7\u24de\u24dd', + '\u24c5\u24ce\u24c9\u24bd\u24c4\u24c3', 'capitalize') + self.checkequal('\u24c5\u24e8\u24e3\u24d7\u24de\u24dd', + '\u24df\u24e8\u24e3\u24d7\u24de\u24dd', 'capitalize') + self.checkequal('\u2160\u2171\u2172', + '\u2160\u2161\u2162', 'capitalize') + self.checkequal('\u2160\u2171\u2172', + '\u2170\u2171\u2172', 'capitalize') + # check with Ll chars with no upper - nothing changes here + self.checkequal('\u019b\u1d00\u1d86\u0221\u1fb7', + '\u019b\u1d00\u1d86\u0221\u1fb7', 'capitalize') + self.checkraises(TypeError, 'hello', 'capitalize', 42) def test_lower(self): |
