diff --git a/pandas/tests/frame/test_api.py b/pandas/tests/frame/test_api.py index 4149485be181d..ec8613faaa663 100644 --- a/pandas/tests/frame/test_api.py +++ b/pandas/tests/frame/test_api.py @@ -529,7 +529,18 @@ async def test_tab_complete_warning(self, ip): code = "import pandas as pd; df = pd.DataFrame()" await ip.run_code(code) - with tm.assert_produces_warning(None): + + # TODO: remove it when Ipython updates + # GH 33567, jedi version raises Deprecation warning in Ipython + import jedi + + if jedi.__version__ < "0.17.0": + warning = tm.assert_produces_warning(None) + else: + warning = tm.assert_produces_warning( + DeprecationWarning, check_stacklevel=False + ) + with warning: with provisionalcompleter("ignore"): list(ip.Completer.completions("df.", 1)) diff --git a/pandas/tests/resample/test_resampler_grouper.py b/pandas/tests/resample/test_resampler_grouper.py index 03c1445e099a0..035698687cfc2 100644 --- a/pandas/tests/resample/test_resampler_grouper.py +++ b/pandas/tests/resample/test_resampler_grouper.py @@ -28,7 +28,15 @@ async def test_tab_complete_ipython6_warning(ip): ) await ip.run_code(code) - with tm.assert_produces_warning(None): + # TODO: remove it when Ipython updates + # GH 33567, jedi version raises Deprecation warning in Ipython + import jedi + + if jedi.__version__ < "0.17.0": + warning = tm.assert_produces_warning(None) + else: + warning = tm.assert_produces_warning(DeprecationWarning, check_stacklevel=False) + with warning: with provisionalcompleter("ignore"): list(ip.Completer.completions("rs.", 1)) diff --git a/pandas/tests/series/test_api.py b/pandas/tests/series/test_api.py index 302ca8d1aa43e..a6430b4525d4a 100644 --- a/pandas/tests/series/test_api.py +++ b/pandas/tests/series/test_api.py @@ -491,7 +491,18 @@ async def test_tab_complete_warning(self, ip): code = "import pandas as pd; s = pd.Series()" await ip.run_code(code) - with tm.assert_produces_warning(None): + + # TODO: remove it when Ipython updates + # GH 33567, jedi version raises Deprecation warning in Ipython + import jedi + + if jedi.__version__ < "0.17.0": + warning = tm.assert_produces_warning(None) + else: + warning = tm.assert_produces_warning( + DeprecationWarning, check_stacklevel=False + ) + with warning: with provisionalcompleter("ignore"): list(ip.Completer.completions("s.", 1))