-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from Shizmob/develop
v0.9.4rc1
- Loading branch information
Showing
5 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import pytest | ||
|
||
from pydle.features import ircv3 | ||
|
||
pytestmark = pytest.mark.unit | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"payload, expected", | ||
[ | ||
( | ||
rb"@+example=raw+:=,escaped\:\s\\ :irc.example.com NOTICE #channel :Message", | ||
{"+example": """raw+:=,escaped; \\"""} | ||
), | ||
( | ||
rb"@+example=\foo\bar :irc.example.com NOTICE #channel :Message", | ||
{"+example": "foobar"} | ||
), | ||
] | ||
) | ||
def test_tagged_message_escape_sequences(payload, expected): | ||
message = ircv3.tags.TaggedMessage.parse(payload) | ||
|
||
assert message.tags == expected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters