Skip to content

Commit 40cb2d9

Browse files
committed
Allow tests to pass on configurations without chardet
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40688
1 parent 3ce5bd2 commit 40cb2d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_stream.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class HTMLInputStreamTest(unittest.TestCase):
1818

1919
def test_char_ascii(self):
20-
stream = HTMLInputStream("'")
20+
stream = HTMLInputStream("'", encoding='ascii')
2121
self.assertEquals(stream.charEncoding, 'ascii')
2222
self.assertEquals(stream.char(), "'")
2323

@@ -26,7 +26,7 @@ def test_char_null(self):
2626
self.assertEquals(stream.char(), u'\ufffd')
2727

2828
def test_char_utf8(self):
29-
stream = HTMLInputStream(u'\u2018'.encode('utf-8'))
29+
stream = HTMLInputStream(u'\u2018'.encode('utf-8'), encoding='utf-8')
3030
self.assertEquals(stream.charEncoding, 'utf-8')
3131
self.assertEquals(stream.char(), u'\u2018')
3232

0 commit comments

Comments
 (0)