Skip to content

Compatibility with pytest 8 #1230

@frenzymadness

Description

@frenzymadness

According to: https://docs.pytest.org/en/latest/deprecations.html#id14 pytest 8 no longer supports setup/teardown functions/methods which leads to many failures like this:

____________________________ test_asyncio_interrupt ____________________________

    @pytest.mark.skipif(tornado.version_info < (5,), reason="only relevant on tornado 5")
    def test_asyncio_interrupt():
>       assert KM is not None
E       assert None is not None

ipykernel/tests/test_eventloop.py:67: AssertionError

Because these functions are ignored:

def setup():
"""start the global kernel (if it isn't running) and return its client"""
global KM, KC
KM, KC = start_new_kernel()
flush_channels(KC)
def teardown():
assert KM is not None
assert KC is not None
KC.stop_channels()
KM.shutdown_kernel(now=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions