Skip to content

Commit

Permalink
Improve tests to try raw lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Gwildor committed Mar 29, 2014
1 parent 9d4fb9f commit f49d68d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyromancer/test/test_command_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ def test_command_matches_patterns():
instance = command(r'cool')
assert bool(instance.matches(line, settings)) is True

line = Line(':irc.example.net 376 A :End of MOTD command')

instance = command(r'example', prefix=False)
assert bool(instance.matches(line, settings)) is False

instance = command(r'example', raw=True, prefix=False)
assert bool(instance.matches(line, settings)) is True


def test_command_matches_code():
with pytest.raises(CommandException):
Expand Down

0 comments on commit f49d68d

Please sign in to comment.