Skip to content

Commit 6670e90

Browse files
NicklasTegnerNicklasTegner
authored andcommitted
Updated test_unicode
1 parent 5926edd commit 6670e90

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,21 +279,21 @@ def test_unicode_input(self):
279279
self.assertTrue(isinstance(written, unicode_type))
280280

281281
# Only use german umlauts in th next test, as iso-8859-15 covers that
282-
expected = u'üäö€{0}'.format(os.linesep)
283-
bytes = u'<p>üäö€</p>'.encode("iso-8859-15")
282+
expected = u'äüäö{0}'.format(os.linesep)
283+
bytes = u'<p>äüäö</p>'.encode("iso-8859-15")
284284

285285
# Without encoding, this fails as we expect utf-8 per default
286286

287287
def f():
288-
pypandoc.convert_text(bytes, 'md', format='html')
288+
written = pypandoc.convert_text(bytes, 'md', format='html')
289289

290-
self.assertRaises(RuntimeError, f)
290+
assert expected != written
291291

292292
def f():
293293
# we have to use something which interprets '\xa4', so latin and -1 does not work :-/
294-
pypandoc.convert_text(bytes, 'md', format='html', encoding="utf-16")
294+
written = pypandoc.convert_text(bytes, 'md', format='html', encoding="utf-16")
295295

296-
self.assertRaises(RuntimeError, f)
296+
assert expected != written
297297
# with the right encoding it should work...
298298
written = pypandoc.convert_text(bytes, 'md', format='html', encoding="iso-8859-15")
299299
self.assertEqualExceptForNewlineEnd(expected, written)

0 commit comments

Comments
 (0)