Skip to content

BUG accept and deprecate negative integer for max_colwidth #31569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 2, 2020
Merged
Prev Previous commit
Next Next commit
reset_option
  • Loading branch information
glemaitre committed Feb 2, 2020
commit 2ed4539e82832c1201472533f3e148982c30ce52
2 changes: 2 additions & 0 deletions pandas/tests/io/formats/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ def test_repr_deprecation_negative_int(self):
# FIXME: remove in version 1.2 after deprecation cycle
# Non-regression test for:
# https://github.com/pandas-dev/pandas/issues/31532
value = get_option("display.max_colwidth")
with tm.assert_produces_warning(FutureWarning):
set_option("display.max_colwidth", -1)
set_option("display.max_colwidth", value)

def test_repr_chop_threshold(self):
df = DataFrame([[0.1, 0.5], [0.5, -0.1]])
Expand Down