| 2044 | self.assertEqual(len(remaining_tzfile_content), 0) |
| 2045 | |
| 2046 | def testIsStd(self): |
| 2047 | # NEW_YORK tzfile contains this isstd information: |
| 2048 | isstd_expected = (0, 0, 0, 1) |
| 2049 | tzc = tz.tzfile(BytesIO(base64.b64decode(NEW_YORK))) |
| 2050 | # gather the actual information as parsed by the tzfile class |
| 2051 | isstd = [] |
| 2052 | for ttinfo in tzc._ttinfo_list: |
| 2053 | # ttinfo objects contain boolean values |
| 2054 | isstd.append(int(ttinfo.isstd)) |
| 2055 | # ttinfo list may contain more entries than isstd file content |
| 2056 | isstd = tuple(isstd[:len(isstd_expected)]) |
| 2057 | self.assertEqual( |
| 2058 | isstd_expected, isstd, |
| 2059 | "isstd UTC/local indicators parsed: %s != tzfile contents: %s" |
| 2060 | % (isstd, isstd_expected)) |
| 2061 | |
| 2062 | def testGMTHasNoDaylight(self): |
| 2063 | # tz.tzstr("GMT+2") improperly considered daylight saving time. |