1 6
from __future__ import absolute_import, division, unicode_literals
2

3 6
from panel.widgets import Ace
4

5

6 6
def test_ace(document, comm):
7 6
    ace = Ace(value="Hello, World", language="python")
8 6
    widget = ace.get_root(document, comm=comm)
9

10 6
    assert isinstance(widget, ace._widget_type)
11 6
    assert ace.value == "Hello, World"
12 6
    assert ace.language == "python"
13

14
    # Try changes
15 6
    ace._process_events({"value": "Hi there!"})
16 6
    assert ace.value == "Hi there!"

Read our documentation on viewing source code .

Loading