| 982 | ]) |
| 983 | def test_sequence_time_with_timezone(time_type, unit, int_type): |
| 984 | def expected_integer_value(t): |
| 985 | # only use with utc time object because it doesn't adjust with the |
| 986 | # offset |
| 987 | units = ['s', 'ms', 'us', 'ns'] |
| 988 | multiplier = 10**(units.index(unit) * 3) |
| 989 | if t is None: |
| 990 | return None |
| 991 | seconds = ( |
| 992 | t.hour * 3600 + |
| 993 | t.minute * 60 + |
| 994 | t.second + |
| 995 | t.microsecond * 10**-6 |
| 996 | ) |
| 997 | return int(seconds * multiplier) |
| 998 | |
| 999 | def expected_time_value(t): |
| 1000 | # only use with utc time object because it doesn't adjust with the |