Skip to content

Commit dd9daf8

Browse files
committed
Add test for issue html5lib#202
1 parent 7d24149 commit dd9daf8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

html5lib/tests/test_parser2.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import StringIO
2+
13
import support
24
from html5lib import html5parser
35
from html5lib.constants import namespaces
@@ -28,6 +30,10 @@ def test_namespace_html_elements_1(self):
2830
doc = parser.parse("<html></html>")
2931
self.assert_(doc.childNodes[0].namespace == None)
3032

33+
def test_unicode_file(self):
34+
parser = html5parser.HTMLParser()
35+
doc = parser.parse(StringIO.StringIO(u"a"))
36+
3137
def buildTestSuite():
3238
return unittest.defaultTestLoader.loadTestsFromName(__name__)
3339

0 commit comments

Comments
 (0)