diff options
| author | Georg Brandl <georg@python.org> | 2010-11-26 07:58:55 (GMT) |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-11-26 07:58:55 (GMT) |
| commit | 837fbb0d9a2e2b4ecc828100eef08bf17ac2b61f (patch) | |
| tree | 1ed376a3b9397bf409c7928ba7c09f0205ffb25f /Lib/test | |
| parent | 79f096a7aab611b6299c0944d6ab2e9552e6caca (diff) | |
| download | cpython-837fbb0d9a2e2b4ecc828100eef08bf17ac2b61f.zip cpython-837fbb0d9a2e2b4ecc828100eef08bf17ac2b61f.tar.gz cpython-837fbb0d9a2e2b4ecc828100eef08bf17ac2b61f.tar.bz2 | |
Merged revisions 85731,85735 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85731 | georg.brandl | 2010-10-19 23:07:16 +0200 (Di, 19 Okt 2010) | 1 line
Be consistent in the spelling of thread-safe(ty).
........
r85735 | georg.brandl | 2010-10-20 08:50:19 +0200 (Mi, 20 Okt 2010) | 1 line
Fix r85728: use "" to mean the system default locale, which should work on more systems.
........
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_calendar.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py index 8396bdf..f20cc03 100644 --- a/Lib/test/test_calendar.py +++ b/Lib/test/test_calendar.py @@ -252,16 +252,13 @@ class CalendarTestCase(unittest.TestCase): def test_localecalendars(self): # ensure that Locale{Text,HTML}Calendar resets the locale properly # (it is still not thread-safe though) + old_october = calendar.TextCalendar().formatmonthname(2010, 10, 10) try: - def_locale = locale.getdefaultlocale() + calendar.LocaleTextCalendar(locale='').formatmonthname(2010, 10, 10) except locale.Error: - # cannot determine a default locale -- skip test + # cannot set the system default locale -- skip rest of test return - old_october = calendar.TextCalendar().formatmonthname(2010, 10, 10) - calendar.LocaleTextCalendar( - locale=def_locale).formatmonthname(2010, 10, 10) - calendar.LocaleHTMLCalendar( - locale=def_locale).formatmonthname(2010, 10) + calendar.LocaleHTMLCalendar(locale='').formatmonthname(2010, 10) new_october = calendar.TextCalendar().formatmonthname(2010, 10, 10) self.assertEquals(old_october, new_october) |
