def setUpClass(cls): if dialog.fontlist.size() < 2: cls.skipTest('need at least 2 fonts') dialog.set_font_sample = Func() # Mask instance method.
def setUp(self): self.redir = WidgetRedirector(self.text) self.func = Func() self.orig_insert = self.redir.register('insert', self.func) self.text.insert('insert', 'asdf') # leaves self.text empty
class listKeysFinal: get = Func()
class TV(tv.TextViewer): # used by TextViewTest transient = Func() grab_set = Func() wait_window = Func()
def setUpClass(cls): # Mask instance methods used by help functions. d = dialog d.set = d.set_add_delete_state = Func() d.upc = d.update_help_changes = Func()
def setUpClass(cls): page = cls.page = dialog.keyspage dialog.note.select(page) page.set_keys_type = Func() page.load_keys_list = Func()
class VW(tv.ViewWindow): # Used in ViewWindowTest. transient = Func() grab_set = Func() wait_window = Func()
def setUpClass(cls): page = cls.page = dialog.genpage dialog.note.select(page) page.set = page.set_add_delete_state = Func() page.upc = page.update_help_changes = Func() page.update()
def test_bold_toggle(self): d = dialog d.set_samples = Func() d.bold_toggle.toggle() self.assertEqual(d.set_samples.called, 1) del d.set_samples
def setUpClass(cls): d = dialog dialog.note.select(d.keyspage) d.set_keys_type = Func() d.load_keys_list = Func()
class list_keys_final: get = Func()
class list_keys_final: get = Func() select_clear = Func() yview = Func()
def setUpClass(cls): dialog.set_samples = Func() # Mask instance method.
def test_force_open_completions_event(self): # Test that force_open_completions_event calls _open_completions o_cs = Func() self.autocomplete.open_completions = o_cs self.autocomplete.force_open_completions_event('event') self.assertEqual(o_cs.args, (True, False, True))
class dummy_acw(): __init__ = Func() show_window = Func(result=False) hide_window = Func()
class TV(tv.TextViewer): # Used in TextViewTest. transient = Func() grab_set = Func() wait_window = Func()
def setUpClass(cls): page = cls.page = dialog.fontpage #dialog.note.insert(0, page, text='copy') #dialog.note.add(page, text='copyfgfg') dialog.note.select(page) page.set_samples = Func() # Mask instance method.
def setUpClass(cls): page = cls.page = dialog.fontpage dialog.note.select(page) page.set_samples = Func() # Mask instance method. page.update()
class TV(tv.TextViewer): transient = Func() grab_set = Func() wait_window = Func()