Skip to content

Commit eb78ea4

Browse files
committed
TST: skip testing on windows for specific formatting which sometimes hangs
xref #14626
1 parent 856476b commit eb78ea4

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

pandas/tests/indexes/test_base.py

+2-14
Original file line numberDiff line numberDiff line change
@@ -915,22 +915,10 @@ 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
920+
# formating does not we are skipping)
921+
index = Index([datetime.now()])
934922
if not is_platform_windows():
935923
formatted = index.format()
936924
expected = [str(index[0])]

0 commit comments

Comments
 (0)