Tests fail
- Dominant language
- Python
- Stars
- 186
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
Here's the pytest output:
```
============================= test session starts ==============================
platform linux -- Python 3.9.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /build/source
plugins: anyio-3.3.4, asyncio-0.17.2, tornasync-0.6.0.post2, trio-0.7.0, twisted-1.13.2
asyncio: mode=legacy
collecting ...
collecting 0 items
collected 91 items
nbclient/tests/test_client.py .......................................... [ 46%]
............................................ [ 94%]
nbclient/tests/test_util.py ..... [100%]
=============================== warnings summary ===============================
../../nix/store/pi9vbmj3r1m7z90i54rag88ynkjiijv9-python3.9-pytest-asyncio-0.17.2/lib/python3.9/site-packages/pytest_asyncio/plugin.py:191
/nix/store/pi9vbmj3r1m7z90i54rag88ynkjiijv9-python3.9-pytest-asyncio-0.17.2/lib/python3.9/site-packages/pytest_asyncio/plugin.py:191: DeprecationWarning: The 'asyncio_mode' default value will change to 'strict' in future, please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest configuration file.
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
nbclient/tests/test_client.py: 110 warnings
/nix/store/8wgz7x0fls638li29zglaifc1zninf77-python3.9-nbformat-5.1.3/lib/python3.9/site-packages/nbformat/validator.py:315: DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release. Call validator.evolve(schema=new_schema).iter_errors(...) instead.
for error in errors:
nbclient/tests/test_client.py::test_parallel_notebooks
/nix/store/pi9vbmj3r1m7z90i54rag88ynkjiijv9-python3.9-pytest-asyncio-0.17.2/lib/python3.9/site-packages/pytest_asyncio/plugin.py:317: DeprecationWarning: '@pytest.fixture' is applied to in 'legacy' mode, please replace it with '@pytest_asyncio.fixture' as a preparation for switching to 'strict' mode (or use 'auto' mode to seamlessly handle all these fixtures as asyncio-driven).
warnings.warn(
nbclient/tests/test_client.py::TestExecute::test_allow_errors
nbclient/tests/test_client.py::TestRunCell::test_allow_error_names
/nix/store/pi9vbmj3r1m7z90i54rag88ynkjiijv9-python3.9-pytest-asyncio-0.17.2/lib/python3.9/site-packages/pytest_asyncio/plugin.py:317: DeprecationWarning: '@pytest.fixture' is applied to .fixture, file=/nix/store/lf8r0dys9gwmgs5zin9wq08dp60zqq0g-python3.9-pytest-6.2.5/lib/python3.9/site-packages/_pytest/unittest.py, line=144> in 'legacy' mode, please replace it with '@pytest_asyncio.fixture' as a preparation for switching to 'strict' mode (or use 'auto' mode to seamlessly handle all these fixtures as asyncio-driven).
warnings.warn(
nbclient/tests/test_client.py::TestRunCell::test_allow_errors
/nix/store/afi0ysqw20yiiw2gr2d28dx40bc4ddf8-python3-3.9.10/lib/python3.9/unittest/mock.py:491: RuntimeWarning: coroutine 'make_async.._' was never awaited
for attr in dir(spec):
nbclient/tests/test_client.py::TestRunCell::test_async_cell_hooks
nbclient/tests/test_client.py::TestRunCell::test_error_and_error_status_messages
nbclient/tests/test_client.py::TestRunCell::test_eventual_deadline_iopub
nbclient/tests/test_client.py::TestRunCell::test_message_for_wrong_parent
/nix/store/afi0ysqw20yiiw2gr2d28dx40bc4ddf8-python3-3.9.10/lib/python3.9/unittest/mock.py:2058: RuntimeWarning: coroutine 'make_async.._' was never awaited
setattr(_type, entry, MagicProxy(entry, self))
nbclient/tests/test_client.py::TestRunCell::test_clear_output_wait_message
/nix/store/dfl0p61r1inwjhp3p15v0xzly3sjyzz9-python3.9-jsonschema-4.4.0/lib/python3.9/site-packages/jsonschema/_validators.py:321: RuntimeWarning: coroutine 'make_async.._' was never awaited
if not any(validator.is_type(instance, type) for type in types):
nbclient/tests/test_client.py::TestRunCell::test_deadline_iopub
/nix/store/afi0ysqw20yiiw2gr2d28dx40bc4ddf8-python3-3.9.10/lib/python3.9/unittest/mock.py:733: RuntimeWarning: coroutine 'make_async.._' was never awaited
return object.__setattr__(self, name, value)
nbclient/tests/test_client.py::TestRunCell::test_eventual_deadline_iopub
/build/source/nbclient/tests/test_client.py:933: RuntimeWarning: coroutine 'make_async.._' was never awaited
message_mock.side_effect = message_seq(list(message_mock.side_effect)[:-1])
nbclient/tests/test_client.py::TestRunCell::test_eventual_deadline_iopub
/nix/store/afi0ysqw20yiiw2gr2d28dx40bc4ddf8-python3-3.9.10/lib/python3.9/unittest/mock.py:766: RuntimeWarning: coroutine 'make_async.._' was never awaited
return object.__setattr__(self, name, value)
nbclient/tests/test_client.py::TestRunCell::test_unknown_comm_message
/nix/store/afi0ysqw20yiiw2gr2d28dx40bc4ddf8-python3-3.9.10/lib/python3.9/unittest/mock.py:2104: RuntimeWarning: coroutine 'make_async.._' was never awaited
self.name = name
-- Docs: https://docs.pytest.org/en/stable/warnings.html
================= 91 passed, 124 warnings in 105.58s (0:01:45) =================
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/nix/store/afi0ysqw20yiiw2gr2d28dx40bc4ddf8-python3-3.9.10/lib/python3.9/contextlib.py", line 137, in __exit__
self.gen.throw(typ, value, traceback)
File "/nix/store/gf2c171gwniq219ia760wsrkzbc3ixq3-python3.9-nest_asyncio-1.5.4/lib/python3.9/site-packages/nest_asyncio.py", line 127, in manage_run
yield
File "/nix/store/gf2c171gwniq219ia760wsrkzbc3ixq3-python3.9-nest_asyncio-1.5.4/lib/python3.9/site-packages/nest_asyncio.py", line 81, in run_until_complete
return f.result()
File "/nix/store/afi0ysqw20yiiw2gr2d28dx40bc4ddf8-python3-3.9.10/lib/python3.9/asyncio/futures.py", line 201, in result
raise self._exception
File "/nix/store/afi0ysqw20yiiw2gr2d28dx40bc4ddf8-python3-3.9.10/lib/python3.9/asyncio/tasks.py", line 256, in __step
result = coro.send(None)
File "/build/source/nbclient/client.py", line 470, in _async_cleanup_kernel
assert self.km is not None
AssertionError
```
The errors here are similar to those in https://github.com/jupyter/nbclient/issues/157 .
Contributor guide
Research direction
Reproduce the failure with the pytest suite and inspect nbclient/client.py around line 470, where the atexit cleanup assertion occurs. Compare the behavior with nbclient/tests/test_client.py and issue #157; done means the 91 tests complete without the reported cleanup traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, python
- Domain
- backend, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100