mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
Trim trailing space unittests directory
This commit is contained in:
@@ -16,10 +16,10 @@ class cmdproc_Tests(wtc.WidgetTestCase):
|
||||
return True
|
||||
def Undo(self):
|
||||
return True
|
||||
|
||||
|
||||
cmd = MyCommand(name='TestCommand')
|
||||
|
||||
|
||||
|
||||
|
||||
def test_cmdproc3(self):
|
||||
class MyCommand(wx.Command):
|
||||
def __init__(self, *args, **kw):
|
||||
@@ -33,34 +33,34 @@ class cmdproc_Tests(wtc.WidgetTestCase):
|
||||
return True
|
||||
def CanUndo(self):
|
||||
return True
|
||||
|
||||
|
||||
cmdproc = wx.CommandProcessor()
|
||||
for name in 'one two three four five'.split():
|
||||
cmd = MyCommand(name=name)
|
||||
cmdproc.Submit(cmd)
|
||||
|
||||
|
||||
cmds = cmdproc.GetCommands()
|
||||
self.assertEqual(len(cmds), 5)
|
||||
self.assertEqual([x.value for x in cmds], [True]*5)
|
||||
|
||||
self.assertTrue(cmdproc.CanUndo())
|
||||
self.assertFalse(cmdproc.CanRedo())
|
||||
|
||||
|
||||
cmdproc.Undo()
|
||||
cmdproc.Undo()
|
||||
self.assertEqual([x.value for x in cmds], [True]*3 + [False]*2)
|
||||
|
||||
|
||||
self.assertTrue(cmdproc.CanRedo())
|
||||
cmdproc.Redo()
|
||||
cmdproc.Redo()
|
||||
self.assertEqual([x.value for x in cmds], [True]*5)
|
||||
|
||||
|
||||
cmdproc.Undo()
|
||||
cmdproc.Undo()
|
||||
cmdproc.Submit(MyCommand(name='NewCmd'))
|
||||
self.assertEqual(len(cmds), 4)
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user