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 @@ -915,23 +915,12 @@ def test_format(self):
915915 self ._check_method_works (Index .format )
916916
917917 # GH 14626
918- # our formatting is different by definition when we have
919- # ms vs us precision (e.g. trailing zeros);
920- # so don't compare this case
921- def datetime_now_without_trailing_zeros ():
922- now = datetime .now ()
923-
924- while str (now ).endswith ("000" ):
925- now = datetime .now ()
926-
927- return now
928-
929- index = Index ([datetime_now_without_trailing_zeros ()])
930-
931918 # windows has different precision on datetime.datetime.now (it doesn't
932919 # include us since the default for Timestamp shows these but Index
933- # formating does not we are skipping
934- if not is_platform_windows ():
920+ # formating does not we are skipping)
921+ now = datetime .now ()
922+ if not str (now ).endswith ("000" ):
923+ index = Index ([now ])
935924 formatted = index .format ()
936925 expected = [str (index [0 ])]
937926 self .assertEqual (formatted , expected )
You can’t perform that action at this time.
0 commit comments