Skip to content

Commit 09efb37

Browse files
committed
Add test for non-empty update
1 parent f5a9104 commit 09efb37

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_doc.py

+12
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,15 @@ def test_empty_update():
191191
doc["text"]
192192
# empty updates should not emit an event
193193
assert not events
194+
195+
196+
def test_not_empty_update():
197+
doc = Doc()
198+
doc["text"] = text = Text()
199+
events = []
200+
sub = doc.observe(partial(callback, events)) # noqa: F841
201+
202+
text += "helloo"
203+
events.clear()
204+
del text[5]
205+
assert events

0 commit comments

Comments
 (0)