Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: tests/test_parser.py

Issue 29677724: Noissue - make parse_line and parse_filterlist also support byte strings (Closed)
Patch Set: Created Jan. 23, 2018, 4:30 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « abp/filters/parser.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/test_parser.py
===================================================================
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -155,8 +155,13 @@
assert list(result) == [Comment('foo'), Metadata('Title', 'bar')]
def test_exception_timing():
result = parse_filterlist(['! good line', '%bad line%'])
assert next(result) == Comment('good line')
with pytest.raises(ParseError):
next(result)
+
+
+def test_parse_line_bytes():
+ line = parse_line(b'! \xc3\xbc')
+ assert line.text == '\xfc'
« no previous file with comments | « abp/filters/parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld