From f49d68db26dcde95ba80b6a0ff72f013f41306d9 Mon Sep 17 00:00:00 2001 From: Gwildor Sok Date: Sat, 29 Mar 2014 17:48:42 +0100 Subject: [PATCH] Improve tests to try raw lines --- pyromancer/test/test_command_decorator.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyromancer/test/test_command_decorator.py b/pyromancer/test/test_command_decorator.py index 3a9c9cd..08a4f8e 100644 --- a/pyromancer/test/test_command_decorator.py +++ b/pyromancer/test/test_command_decorator.py @@ -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):