示例#1
0
 def test_get_corrected_commands_with_rule_returns_list(self):
     rule = Rule(get_new_command=lambda x: [x.script + '!', x.script + '@'],
                 priority=100)
     assert (list(rule.get_corrected_commands(Command(script='test'))) == [
         CorrectedCommand(script='test!', priority=100),
         CorrectedCommand(script='test@', priority=200)
     ])
示例#2
0
 def test_get_corrected_commands_with_rule_returns_list(self):
     rule = Rule(get_new_command=lambda x: [x.script + "!", x.script + "@"],
                 priority=100)
     assert list(rule.get_corrected_commands(Command("test", ""))) == [
         CorrectedCommand(script="test!", priority=100),
         CorrectedCommand(script="test@", priority=200),
     ]
示例#3
0
 def test_get_corrected_commands_with_rule_returns_command(self):
     rule = Rule(get_new_command=lambda x: x.script + '!',
                 priority=100)
     assert (list(rule.get_corrected_commands(Command(script='test')))
             == [CorrectedCommand(script='test!', priority=100)])
示例#4
0
 def test_get_corrected_commands_with_rule_returns_command(self):
     rule = Rule(get_new_command=lambda x: x.script + '!', priority=100)
     assert list(rule.get_corrected_commands(Command(script='test'))) \
            == [CorrectedCommand(script='test!', priority=100)]
示例#5
0
 def test_get_corrected_commands_with_rule_returns_list(self):
     rule = Rule(get_new_command=lambda x: [x.script + '!', x.script + '@'],
                 priority=100)
     assert list(rule.get_corrected_commands(Command(script='test'))) \
            == [CorrectedCommand(script='test!', priority=100),
                CorrectedCommand(script='test@', priority=200)]
示例#6
0
 def test_get_corrected_commands_with_rule_returns_list(self):
     rule = Rule(get_new_command=lambda x: [x.script + "!", x.script + "@"], priority=100)
     assert list(rule.get_corrected_commands(Command(script="test"))) == [
         CorrectedCommand(script="test!", priority=100),
         CorrectedCommand(script="test@", priority=200),
     ]