Skip to content

Commit dc91692

Browse files
committed
Test awareness getter/setter
1 parent 7845ff7 commit dc91692

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/test_ydocs.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright (c) Jupyter Development Team.
22
# Distributed under the terms of the Modified BSD License.
33

4+
from pycrdt_websocket.awareness import Awareness
5+
46
from jupyter_ydoc import YBlob, YNotebook
57

68

@@ -53,3 +55,14 @@ def test_ynotebook_undo_manager():
5355
ynotebook.undo_manager.undo()
5456
assert len(ynotebook.ycells) == 0
5557
assert not ynotebook.undo_manager.can_undo()
58+
59+
60+
def test_awareness():
61+
yblob = YBlob()
62+
63+
assert yblob.awareness is None
64+
65+
awareness = Awareness(yblob.ydoc)
66+
yblob.awareness = awareness
67+
68+
assert yblob.awareness == awareness

0 commit comments

Comments
 (0)