File tree 1 file changed +4
-15
lines changed
1 file changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -914,23 +914,12 @@ def test_format(self):
914
914
self ._check_method_works (Index .format )
915
915
916
916
# GH 14626
917
- # our formatting is different by definition when we have
918
- # ms vs us precision (e.g. trailing zeros);
919
- # so don't compare this case
920
- def datetime_now_without_trailing_zeros ():
921
- now = datetime .now ()
922
-
923
- while str (now ).endswith ("000" ):
924
- now = datetime .now ()
925
-
926
- return now
927
-
928
- index = Index ([datetime_now_without_trailing_zeros ()])
929
-
930
917
# windows has different precision on datetime.datetime.now (it doesn't
931
918
# include us since the default for Timestamp shows these but Index
932
- # formating does not we are skipping
933
- if not is_platform_windows ():
919
+ # formating does not we are skipping)
920
+ now = datetime .now ()
921
+ if not str (now ).endswith ("000" ):
922
+ index = Index ([now ])
934
923
formatted = index .format ()
935
924
expected = [str (index [0 ])]
936
925
self .assertEqual (formatted , expected )
You can’t perform that action at this time.
0 commit comments