You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At some point, IPython changed their code to be async. Now, our tests using their tab completion stuff causes warnings.
$ pytest pandas/tests/ -k test_tab_complete_warning
================================================================================= warnings summary =================================================================================
pandas/tests/arrays/categorical/test_warnings.py::TestCategoricalWarnings::test_tab_complete_warning
/Users/taugspurger/sandbox/pandas/pandas/tests/arrays/categorical/test_warnings.py:14: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
ip.run_code(code)
pandas/tests/frame/test_api.py::TestDataFrameMisc::test_tab_complete_warning
/Users/taugspurger/sandbox/pandas/pandas/tests/frame/test_api.py:575: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
ip.run_code(code)
pandas/tests/indexes/test_base.py::TestIndex::test_tab_complete_warning
/Users/taugspurger/sandbox/pandas/pandas/tests/indexes/test_base.py:2420: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
ip.run_code(code)
pandas/tests/series/test_api.py::TestSeriesMisc::test_tab_complete_warning
/Users/taugspurger/sandbox/pandas/pandas/tests/series/test_api.py:508: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
ip.run_code(code)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
=========================================================== 4 passed, 11 skipped, 62860 deselected, 4 warnings in 29.50s ===========================================================
There's a race condition between the completion of the ip.run_code(code) calls and the asserts later on. We need to explicitly wait for the ip.run_code(code) to finish before moving on with the test. The easiest way is to
Mark the tests as async with the 3rd-party pytest-asyncio (need to add to the CI)
At some point, IPython changed their code to be async. Now, our tests using their tab completion stuff causes warnings.
There's a race condition between the completion of the
ip.run_code(code)
calls and the asserts later on. We need to explicitly wait for theip.run_code(code)
to finish before moving on with the test. The easiest way is toasync def
.await
to theip.run_code
This is currently blocked by #29034. Once we drop 3.5, we can use theI forgot 3.5 had async / await.async
andawait
syntax.The text was updated successfully, but these errors were encountered: