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

Fix compatibility with pytest 8 #3903

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# Utility stuff
#-----------------------------------------------------------------------------

from .utils import setup, teardown

def f(**kwargs):
pass

Expand Down
1 change: 0 additions & 1 deletion python/ipywidgets/ipywidgets/widgets/tests/test_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pytest

from .. import jslink, jsdlink, ToggleButton
from .utils import setup, teardown

def test_jslink_args():
with pytest.raises(TypeError):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from traitlets import Bool, Tuple, List

from .utils import setup, teardown, DummyComm
from .utils import setup

from ..widget import Widget

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from traitlets import Bool, Tuple, List, Instance, CFloat, CInt, Float, Int, TraitError, observe

from .utils import setup, teardown
from .utils import setup

import ipywidgets
from ipywidgets import Widget
Expand Down
6 changes: 3 additions & 3 deletions python/ipywidgets/ipywidgets/widgets/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
NEW_COMM_PACKAGE = False

import ipykernel.comm

import pytest

class DummyComm():
comm_id = 'a-b-c-d'
Expand Down Expand Up @@ -87,10 +87,10 @@ def teardown_test_comm():
setattr(Widget, attr, value)
_widget_attrs.clear()

@pytest.fixture(autouse=True)
def setup():
setup_test_comm()

def teardown():
yield
teardown_test_comm()

def call_method(method, *args, **kwargs):
Expand Down