diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-24 02:51:01 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-24 02:51:01 +0200 |
commit | 4cfae027b39d14a5a43f337c1a38b42d7461dd3a (patch) | |
tree | a099cd8fcaabaf4c6cb3aff1e686bcae50f745f6 /Lib/test/test_locale.py | |
parent | a620facc1f66654c1b3337ed6d7dfa158cfaf8f2 (diff) | |
download | cpython-git-4cfae027b39d14a5a43f337c1a38b42d7461dd3a.tar.gz |
Issue #1813: Fix codec lookup and setting/getting locales under Turkish locales.
Diffstat (limited to 'Lib/test/test_locale.py')
-rw-r--r-- | Lib/test/test_locale.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py index 8bb99cb540..f3330d0719 100644 --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py @@ -396,6 +396,19 @@ class TestMiscellaneous(unittest.TestCase): # crasher from bug #7419 self.assertRaises(locale.Error, locale.setlocale, 12345) + def test_getsetlocale_issue1813(self): + # Issue #1813: setting and getting the locale under a Turkish locale + oldlocale = locale.getlocale() + self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale) + try: + locale.setlocale(locale.LC_CTYPE, 'tr_TR') + except locale.Error: + # Unsupported locale on this system + self.skipTest('test needs Turkish locale') + loc = locale.getlocale() + locale.setlocale(locale.LC_CTYPE, loc) + self.assertEqual(loc, locale.getlocale()) + def test_main(): tests = [ |