| 959 | ]) |
| 960 | def test_sequence_time_with_timezone(time_type, unit, int_type): |
| 961 | def expected_integer_value(t): |
| 962 | # only use with utc time object because it doesn't adjust with the |
| 963 | # offset |
| 964 | units = ['s', 'ms', 'us', 'ns'] |
| 965 | multiplier = 10**(units.index(unit) * 3) |
| 966 | if t is None: |
| 967 | return None |
| 968 | seconds = ( |
| 969 | t.hour * 3600 + |
| 970 | t.minute * 60 + |
| 971 | t.second + |
| 972 | t.microsecond * 10**-6 |
| 973 | ) |
| 974 | return int(seconds * multiplier) |
| 975 | |
| 976 | def expected_time_value(t): |
| 977 | # only use with utc time object because it doesn't adjust with the |