示例#1
0
def test_add_editor():
    ac = Application()
    m = Mocker()
    ed = m.mock(Editor)
    assert not ac.editors
    with m:
        ac.add_editor(ed)
    assert ed in ac.editors
示例#2
0
def test_add_editor():
    ac = Application()
    m = Mocker()
    ed = m.mock(Editor)
    assert not ac.editors
    with m:
        ac.add_editor(ed)
    assert ed in ac.editors
示例#3
0
 def test(c):
     m = Mocker()
     app = Application()
     ctype = 0
     item = m.mock(TextDocument if c.item_type == "d" else Project)
     for e in range(c.eds):
         ed = m.mock(Editor)
         ed.item_changed(item, ctype)
         app.add_editor(ed)
     with m:
         app.item_changed(item, ctype)
示例#4
0
 def test(c):
     m = Mocker()
     app = Application()
     ctype = 0
     item = m.mock(TextDocument if c.item_type == "d" else Project)
     for e in range(c.eds):
         ed = m.mock(Editor)
         ed.item_changed(item, ctype)
         app.add_editor(ed)
     with m:
         app.item_changed(item, ctype)