[docs]deftest_isostr2date(self):# test the full stringa=ibllib.time.isostr2date('2018-03-01T12:34:56.99999')self.assertTrue(a==datetime.datetime(2018,3,1,12,34,56,999990))# test UTC offset# a = ibllib.time.isostr2date('2018-03-01T12:34:56+02:00') # FAILS!# if ms is rounded, test without the F fieldb=ibllib.time.isostr2date('2018-03-01T12:34:56')self.assertTrue(b==datetime.datetime(2018,3,1,12,34,56))# test a mixed list inputc=['2018-03-01T12:34:56.99999','2018-03-01T12:34:56']d=ibllib.time.isostr2date(c)self.assertTrue((d[0]==a)and(d[1]==b))# test with pandas seriese=ibllib.time.isostr2date(pd.Series(c))self.assertTrue((e[0]==a)and(e[1]==b))