Skip to content

Commit

Permalink
Merge pull request #36 from stchris/py3-unicode
Browse files Browse the repository at this point in the history
Make sure that unicode strings are parsed properly. #17
  • Loading branch information
Christian Stefanescu committed Mar 10, 2017
2 parents beda6e0 + 32a1a9c commit c0f102d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ def test_lengths(self):
self.assertEquals(0, len(o.page.menu.items.item[0].name))
self.assertEquals(0, len(o.page.menu.items.item[1].name))

def test_unicode_string(self):
o = untangle.parse('<Element>valüé ◔‿◔</Element>')
self.assertEquals(u'valüé ◔‿◔', o.Element.cdata)


class FileObjects(unittest.TestCase):
""" Test reading from file-like objects """
Expand Down

0 comments on commit c0f102d

Please sign in to comment.