Skip to content

Commit 29c6263

Browse files
committed
Update tests to expect pprint formatting. Use new config location. Small update in doc.
1 parent 13b73a6 commit 29c6263

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

doc/source/whatsnew/v0.25.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Other API Changes
216216
- ``Timestamp`` and ``Timedelta`` scalars now implement the :meth:`to_numpy` method as aliases to :meth:`Timestamp.to_datetime64` and :meth:`Timedelta.to_timedelta64`, respectively. (:issue:`24653`)
217217
- :meth:`Timestamp.strptime` will now rise a ``NotImplementedError`` (:issue:`25016`)
218218
- Bug in :meth:`DatetimeIndex.snap` which didn't preserve the ``name`` of the input :class:`Index` (:issue:`25575`)
219-
- :meth:`Index.groupby` and dependent methods (notably :meth:`GroupBy.groups`) now return object with abbreviated repr (:issue:`1135`)
219+
- :meth:`Index.groupby` and dependent methods (notably :attr:`GroupBy.groups`) now return object with abbreviated repr (:issue:`1135`)
220220

221221
.. _whatsnew_0250.deprecations:
222222

pandas/core/indexes/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import numpy as np
88

9+
from pandas._config.config import get_option
910
from pandas._libs import (
1011
algos as libalgos, index as libindex, join as libjoin, lib)
1112
from pandas._libs.lib import is_datetime_array
@@ -39,7 +40,6 @@
3940
from pandas.core.arrays import ExtensionArray
4041
from pandas.core.base import IndexOpsMixin, PandasObject
4142
import pandas.core.common as com
42-
from pandas.core.config import get_option
4343
from pandas.core.indexes.frozen import FrozenList
4444
import pandas.core.missing as missing
4545
from pandas.core.ops import get_op_result_name, make_invalid_op

pandas/tests/io/formats/test_format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,11 +1760,11 @@ def test_groups_repr_truncates(self):
17601760

17611761
with option_context('display.max_rows', 2):
17621762
x = df.groupby('a').groups
1763-
assert ', ... ,' in x.__repr__()
1763+
assert x.__repr__().endswith('...}')
17641764

17651765
with option_context('display.max_rows', 5):
17661766
x = df.groupby('a').groups
1767-
assert ', ... ,' not in x.__repr__()
1767+
assert not x.__repr__().endswith('...}')
17681768

17691769

17701770
def gen_series_formatting():

0 commit comments

Comments
 (0)