Пример #1
0
 def test_render_Python_one_arg_with_space(self):
     cmd = replay.MacroCommand()
     cmd.command = "layout.createOrClose"
     cmd.prefix = "!"
     cmd.args = [dict({'argNames': 'width', 'argValues': '500 500'})]
     self.assertEqual(cmd.render_Python(),
                      'lx.eval(\'!layout.createOrClose width:"500 500"\')')
Пример #2
0
 def test_render_LXM_one_arg_with_space(self):
     cmd = replay.MacroCommand()
     cmd.command = "layout.createOrClose"
     cmd.prefix = "!"
     cmd.args = [dict({'argNames': 'width', 'argValues': '500 500'})]
     self.assertEqual(cmd.render_LXM(),
                      "!layout.createOrClose width:\"500 500\"")
Пример #3
0
 def test_render_LXM_many_args(self):
     cmd = replay.MacroCommand()
     cmd.command = "layout.createOrClose"
     cmd.prefix = "!"
     cmd.args = [
         dict({
             'argNames': 'width',
             'argValues': '500'
         }),
         dict({
             'argNames': 'height',
             'argValues': '300'
         })
     ]
     self.assertEqual(cmd.render_LXM(),
                      "!layout.createOrClose width:500 height:300")
Пример #4
0
 def test_render_Python_no_args(self):
     cmd = replay.MacroCommand()
     cmd.command = "layout.createOrClose"
     cmd.prefix = "!"
     self.assertEqual(cmd.render_Python(),
                      "lx.eval(\'!layout.createOrClose\')")
Пример #5
0
 def test_render_LXM_no_args(self):
     cmd = replay.MacroCommand()
     cmd.command = "layout.createOrClose"
     cmd.prefix = "!"
     self.assertEqual(cmd.render_LXM(), "!layout.createOrClose")