TST: skip testing on windows for specific formatting which sometimes hangs (#14851)
xref #14626
This commit is contained in:
parent
000e8d4f2f
commit
34807fc25e
|
@ -915,23 +915,12 @@ class TestIndex(Base, tm.TestCase):
|
|||
self._check_method_works(Index.format)
|
||||
|
||||
# GH 14626
|
||||
# our formatting is different by definition when we have
|
||||
# ms vs us precision (e.g. trailing zeros);
|
||||
# so don't compare this case
|
||||
def datetime_now_without_trailing_zeros():
|
||||
now = datetime.now()
|
||||
|
||||
while str(now).endswith("000"):
|
||||
now = datetime.now()
|
||||
|
||||
return now
|
||||
|
||||
index = Index([datetime_now_without_trailing_zeros()])
|
||||
|
||||
# windows has different precision on datetime.datetime.now (it doesn't
|
||||
# include us since the default for Timestamp shows these but Index
|
||||
# formating does not we are skipping
|
||||
if not is_platform_windows():
|
||||
# formating does not we are skipping)
|
||||
now = datetime.now()
|
||||
if not str(now).endswith("000"):
|
||||
index = Index([now])
|
||||
formatted = index.format()
|
||||
expected = [str(index[0])]
|
||||
self.assertEqual(formatted, expected)
|
||||
|
|
Loading…
Reference in New Issue