@@ -921,13 +921,18 @@ def test_as_time(self):
921921 times = (
922922 ["07.02.2022" , "18.04.2021" ], # date only
923923 ["07.02.2022 01:02:03" , "18.04.2021 01:02:03" ], # datetime
924+ # datetime with timezone
925+ ["2021-02-08 01:02:03+01:00" , "2021-02-07 01:02:03+01:00" ],
924926 ["010203" , "010203" ], # time
925927 ["02-07" , "04-18" ],
926928 )
927- formats = ["25.11.2021" , "25.11.2021 00:00:00" , "000000" , "11-25" ]
929+ formats = [
930+ "25.11.2021" , "25.11.2021 00:00:00" , "2021-11-25 00:00:00" , "000000" , "11-25"
931+ ]
928932 expected = [
929933 [d ("2022-02-07" ), d ("2021-04-18" )],
930934 [d ("2022-02-07 01:02:03" ), d ("2021-04-18 01:02:03" )],
935+ [d ("2021-02-08 01:02:03+0100" ), d ("2021-02-07 01:02:03+0100" )],
931936 [d ("01:02:03" ), d ("01:02:03" )],
932937 [d ("1900-02-07" ), d ("1900-04-18" )],
933938 ]
@@ -952,6 +957,16 @@ def test_as_time(self):
952957 np .array (list (chain (expected , expected )), dtype = float ).transpose ()
953958 )
954959
960+ def test_raise_pandas_version (self ):
961+ """
962+ When this test start to fail:
963+ - remove this test
964+ - remove if clause in datetime_to_epoch function and supporting comments
965+ - set pandas dependency version to pandas>=1.4
966+ """
967+ from datetime import datetime
968+ self .assertLess (datetime .today (), datetime (2023 , 1 , 1 ))
969+
955970 def test_reinterpret_string (self ):
956971 table = self .data_str
957972 domain = table .domain
0 commit comments