Skip to content

Commit

Permalink
Fix compatibility with pytest 8
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzymadness committed Apr 11, 2024
1 parent b78de43 commit bbc6c06
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
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

0 comments on commit bbc6c06

Please sign in to comment.