コード例 #1
0
ファイル: test_application.py プロジェクト: khairy/editxt
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
ファイル: test_application.py プロジェクト: khairy/editxt
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
ファイル: test_application.py プロジェクト: khairy/editxt
 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
ファイル: test_application.py プロジェクト: khairy/editxt
 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)