We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3eb4dfd commit b2a8323Copy full SHA for b2a8323
tests/test_yunicode.py
@@ -0,0 +1,21 @@
1
+from jupyter_ydoc import YUnicode
2
+
3
4
+def test_set_no_op_if_unchaged():
5
+ text = YUnicode()
6
+ text.set("test content")
7
8
+ changes = []
9
10
+ def record_changes(topic, event):
11
+ changes.append((topic, event))
12
13
+ text.observe(record_changes)
14
15
+ model = text.get()
16
17
+ # Call set with identical text
18
+ text.set(model)
19
20
+ # No changes should be observed at all
21
+ assert changes == []
0 commit comments