Skip to content

Commit bd731d4

Browse files
authored
CI: ipython tab completion tests (#39569)
1 parent 300d1fc commit bd731d4

File tree

4 files changed

+12
-40
lines changed

4 files changed

+12
-40
lines changed

pandas/tests/arrays/categorical/test_warnings.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,8 @@ async def test_tab_complete_warning(self, ip):
1515
code = "import pandas as pd; c = Categorical([])"
1616
await ip.run_code(code)
1717

18-
# GH 31324 newer jedi version raises Deprecation warning
19-
import jedi
20-
21-
if jedi.__version__ < "0.16.0":
22-
warning = tm.assert_produces_warning(None)
23-
else:
24-
warning = tm.assert_produces_warning(
25-
DeprecationWarning, check_stacklevel=False
26-
)
27-
with warning:
18+
# GH 31324 newer jedi version raises Deprecation warning;
19+
# appears resolved 2021-02-02
20+
with tm.assert_produces_warning(None):
2821
with provisionalcompleter("ignore"):
2922
list(ip.Completer.completions("c.", 1))

pandas/tests/frame/test_api.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -274,17 +274,9 @@ async def test_tab_complete_warning(self, ip, frame_or_series):
274274

275275
await ip.run_code(code)
276276

277-
# TODO: remove it when Ipython updates
278-
# GH 33567, jedi version raises Deprecation warning in Ipython
279-
import jedi
280-
281-
if jedi.__version__ < "0.17.0":
282-
warning = tm.assert_produces_warning(None)
283-
else:
284-
warning = tm.assert_produces_warning(
285-
DeprecationWarning, check_stacklevel=False
286-
)
287-
with warning:
277+
# GH 31324 newer jedi version raises Deprecation warning;
278+
# appears resolved 2021-02-02
279+
with tm.assert_produces_warning(None):
288280
with provisionalcompleter("ignore"):
289281
list(ip.Completer.completions("obj.", 1))
290282

pandas/tests/indexes/test_base.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,16 +1595,9 @@ async def test_tab_complete_warning(self, ip):
15951595
code = "import pandas as pd; idx = Index([1, 2])"
15961596
await ip.run_code(code)
15971597

1598-
# GH 31324 newer jedi version raises Deprecation warning
1599-
import jedi
1600-
1601-
if jedi.__version__ < "0.16.0":
1602-
warning = tm.assert_produces_warning(None)
1603-
else:
1604-
warning = tm.assert_produces_warning(
1605-
DeprecationWarning, check_stacklevel=False
1606-
)
1607-
with warning:
1598+
# GH 31324 newer jedi version raises Deprecation warning;
1599+
# appears resolved 2021-02-02
1600+
with tm.assert_produces_warning(None):
16081601
with provisionalcompleter("ignore"):
16091602
list(ip.Completer.completions("idx.", 4))
16101603

pandas/tests/resample/test_resampler_grouper.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,9 @@ async def test_tab_complete_ipython6_warning(ip):
3131
)
3232
await ip.run_code(code)
3333

34-
# TODO: remove it when Ipython updates
35-
# GH 33567, jedi version raises Deprecation warning in Ipython
36-
import jedi
37-
38-
if jedi.__version__ < "0.17.0":
39-
warning = tm.assert_produces_warning(None)
40-
else:
41-
warning = tm.assert_produces_warning(DeprecationWarning, check_stacklevel=False)
42-
with warning:
34+
# GH 31324 newer jedi version raises Deprecation warning;
35+
# appears resolved 2021-02-02
36+
with tm.assert_produces_warning(None):
4337
with provisionalcompleter("ignore"):
4438
list(ip.Completer.completions("rs.", 1))
4539

0 commit comments

Comments
 (0)