Here are the examples of the python api bokeh.document.events.DocumentChangedEvent taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
3
Source : test_events.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_dispatch(self):
e = bde.DocumentChangedEvent("doc", "setter", "invoker")
e.dispatch(FakeEmptyDispatcher())
d = FakeFullDispatcher()
e.dispatch(d)
assert d.called == ['_document_changed']
def test_combine_ignores_all(self):
3
Source : test_events.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_combine_ignores_all(self):
e = bde.DocumentChangedEvent("doc", "setter", "invoker")
e2 = bde.DocumentChangedEvent("doc", "setter", "invoker")
assert e.combine(e2) == False
# DocumentPatchedEvent --------------------------------------------------------
class TestDocumentPatchedEvent(object):
0
Source : test_events.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_init(self):
e = bde.DocumentChangedEvent("doc")
assert e.document == "doc"
assert e.setter == None
assert e.callback_invoker == None
e = bde.DocumentChangedEvent("doc", "setter")
assert e.document == "doc"
assert e.setter == "setter"
assert e.callback_invoker == None
e = bde.DocumentChangedEvent("doc", callback_invoker="invoker")
assert e.document == "doc"
assert e.setter == None
assert e.callback_invoker == "invoker"
e = bde.DocumentChangedEvent("doc", "setter", "invoker")
assert e.document == "doc"
assert e.setter == "setter"
assert e.callback_invoker == "invoker"
def test_dispatch(self):