File tree Expand file tree Collapse file tree 1 file changed +4
-15
lines changed
Expand file tree Collapse file tree 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):
914914 self ._check_method_works (Index .format )
915915
916916 # 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-
930917 # windows has different precision on datetime.datetime.now (it doesn't
931918 # 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 ])
934923 formatted = index .format ()
935924 expected = [str (index [0 ])]
936925 self .assertEqual (formatted , expected )
You can’t perform that action at this time.
0 commit comments