Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail #201

Open
doronbehar opened this issue Feb 27, 2022 · 1 comment
Open

Tests fail #201

doronbehar opened this issue Feb 27, 2022 · 1 comment

Comments

@doronbehar
Copy link

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 <fixture capfd, file=/nix/store/lf8r0dys9gwmgs5zin9wq08dp60zqq0g-python3.9-pytest-6.2.5/lib/python3.9/site-packages/_pytest/capture.py, line=936> 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 _make_xunit_fixture.<locals>.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.<locals>._' 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.<locals>._' 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.<locals>._' 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.<locals>._' 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.<locals>._' 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.<locals>._' 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.<locals>._' 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 #157 .

@davidbrochart
Copy link
Member

Hi @doronbehar, I don't see any test failing, but an error at exit. We've been seeing them often, maybe it's time to clean them up. Do you want to submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants