Mercurial > p > roundup > code
diff test/test_dates.py @ 4407:f6a2bfd351ee
force tests checking text output to work in the "C" locale
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 09 Aug 2010 04:43:50 +0000 |
| parents | d5e2767d4e91 |
| children | 6e3e4f24c753 |
line wrap: on
line diff
--- a/test/test_dates.py Thu Aug 05 00:00:19 2010 +0000 +++ b/test/test_dates.py Mon Aug 09 04:43:50 2010 +0000 @@ -23,11 +23,21 @@ import datetime import calendar +from roundup import date, i18n from roundup.date import Date, Interval, Range, fixTimeOverflow, \ get_timezone class DateTestCase(unittest.TestCase): + def setUp(self): + self.old_gettext_ = i18n.gettext + self.old_ngettext_ = i18n.ngettext + i18n.gettext = i18n.get_translation(language='C').gettext + i18n.ngettext = i18n.get_translation(language='C').ngettext + + def tearDown(self): + i18n.gettext = self.old_gettext_ + i18n.ngettext = self.old_ngettext_ def testDateInterval(self): ae = self.assertEqual
