Beispiel #1
0
    def testTzResNameFromString(self):
        tzr = tzwin.tzres()
        self.assertEqual(tzr.name_from_string("@tzres.dll,-221"), "Alaskan Daylight Time")

        self.assertEqual(tzr.name_from_string("Samoa Daylight Time"), "Samoa Daylight Time")

        with self.assertRaises(ValueError):
            tzr.name_from_string("@tzres.dll,100")
Beispiel #2
0
    def testTzResNameFromString(self):
        tzr = tzwin.tzres()
        self.assertEqual(tzr.name_from_string('@tzres.dll,-221'),
                         'Alaskan Daylight Time')

        self.assertEqual(tzr.name_from_string('Samoa Daylight Time'),
                         'Samoa Daylight Time')

        with self.assertRaises(ValueError):
            tzr.name_from_string('@tzres.dll,100')
Beispiel #3
0
    def testTzResNameFromString(self):
        tzr = tzwin.tzres()
        self.assertEqual(tzr.name_from_string('@tzres.dll,-221'),
                         'Alaskan Daylight Time')

        self.assertEqual(tzr.name_from_string('Samoa Daylight Time'),
                         'Samoa Daylight Time')

        with self.assertRaises(ValueError):
            tzr.name_from_string('@tzres.dll,100')
Beispiel #4
0
 def testTzResLoadName(self):
     # This may not work right on non-US locales.
     tzr = tzwin.tzres()
     self.assertEqual(tzr.load_name(112), "Eastern Standard Time")
Beispiel #5
0
 def testTzResLoadName(self):
     # This may not work right on non-US locales.
     tzr = tzwin.tzres()
     self.assertEqual(tzr.load_name(112), "Eastern Standard Time")