Skip to content

Commit c1b7993

Browse files
committed
Fix hold_sync test
We have to explicitly use hold_sync in the test, since jupyter-widgets#3271 was targeted to 8.0 and not backported to 7.x.
1 parent 97e2257 commit c1b7993

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ipywidgets/widgets/tests/test_set_state.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,9 @@ class AnnoyingWidget(Widget):
265265
def _propagate_value(self, change):
266266
print('_propagate_value', change.new)
267267
if change.new == 42:
268-
self.value = 2
269-
self.other = 11
268+
with self.hold_sync():
269+
self.value = 2
270+
self.other = 11
270271

271272
widget = AnnoyingWidget(value=1)
272273
assert widget.value == 1

0 commit comments

Comments
 (0)