Skip to content

Commit 00eb63c

Browse files
author
tp
committed
add test for depr. attibute added to deprecation list
1 parent db92219 commit 00eb63c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pandas/tests/indexes/test_base.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,6 +2088,17 @@ def test_get_duplicates_deprecated(self):
20882088
with tm.assert_produces_warning(FutureWarning):
20892089
index.get_duplicates()
20902090

2091+
def test_tab_complete_warning(self, ip):
2092+
# https://github.com/pandas-dev/pandas/issues/16409
2093+
pytest.importorskip('IPython', minversion="6.0.0")
2094+
from IPython.core.completer import provisionalcompleter
2095+
2096+
code = "import pandas as pd; idx = pd.Index([1, 2])"
2097+
ip.run_code(code)
2098+
with tm.assert_produces_warning(None):
2099+
with provisionalcompleter('ignore'):
2100+
list(ip.Completer.completions('idx.', 4))
2101+
20912102

20922103
class TestMixedIntIndex(Base):
20932104
# Mostly the tests from common.py for which the results differ

0 commit comments

Comments
 (0)