|
2 | 2 | from labelbox.utils import format_iso_datetime, format_iso_from_string |
3 | 3 |
|
4 | 4 |
|
5 | | -@pytest.mark.parametrize( |
6 | | - 'datetime_str, expected_datetime_str', |
7 | | - [ |
8 | | - ('2011-11-04T00:05:23Z', '2011-11-04T00:05:23Z'), |
9 | | - ('2011-11-04T00:05:23+00:00', '2011-11-04T00:05:23Z'), |
10 | | - ('2011-11-04T00:05:23+05:00', '2011-11-04T00:05:23Z' |
11 | | - ), # NOTE: The current implementation is not converting from timezone other then UTC. This how it has been working prior to my change. |
12 | | - ('2011-11-04T00:05:23', '2011-11-04T00:05:23Z') |
13 | | - ]) |
| 5 | +@pytest.mark.parametrize('datetime_str, expected_datetime_str', |
| 6 | + [('2011-11-04T00:05:23Z', '2011-11-04T00:05:23Z'), |
| 7 | + ('2011-11-04T00:05:23+00:00', '2011-11-04T00:05:23Z'), |
| 8 | + ('2011-11-04T00:05:23+05:00', '2011-11-03T19:05:23Z'), |
| 9 | + ('2011-11-04T00:05:23', '2011-11-04T00:05:23Z')]) |
14 | 10 | def test_datetime_parsing(datetime_str, expected_datetime_str): |
15 | 11 | # NOTE I would normally not take 'expected' using another function from sdk code, but in this case this is exactly the usage in _validate_parse_datetime |
16 | 12 | assert format_iso_datetime( |
|
0 commit comments