We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed21736 commit 68a72a7Copy full SHA for 68a72a7
pandas/tests/indexes/test_base.py
@@ -913,7 +913,7 @@ def test_summary(self):
913
def test_format(self):
914
self._check_method_works(Index.format)
915
916
- index = Index([datetime.now()])
+ index = Index([self.datetime_now_without_trailing_zeros()])
917
918
# windows has different precision on datetime.datetime.now (it doesn't
919
# include us since the default for Timestamp shows these but Index
@@ -937,6 +937,15 @@ def test_format(self):
937
938
self.strIndex[:0].format()
939
940
+ # GH 14626
941
+ def datetime_now_without_trailing_zeros(self):
942
+ now = datetime.now()
943
+
944
+ while str(now).endswith("000"):
945
946
947
+ return now
948
949
def test_format_with_name_time_info(self):
950
# bug I fixed 12/20/2011
951
inc = timedelta(hours=4)
0 commit comments