X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=test%2Ftest_compat.py;h=b6bfad05e3c85c07854cc00c337a12caf493e849;hb=896c7a23cd9fbfc589f26e9a7bbada38a325e2ad;hp=834f4bc55233765f653ee703ff6ea811edf3065e;hpb=387db16a789fea25795433538d80513c18d0f699;p=youtube-dl.git
diff --git a/test/test_compat.py b/test/test_compat.py
index 834f4bc55..b6bfad05e 100644
--- a/test/test_compat.py
+++ b/test/test_compat.py
@@ -74,10 +74,19 @@ class TestCompat(unittest.TestCase):
self.assertEqual(compat_shlex_split('-option "one two"'), ['-option', 'one two'])
def test_compat_etree_fromstring(self):
- xml = ''
+ xml = '''
+
+ foo
+ ä¸æ
+ spam
+
+ '''
doc = compat_etree_fromstring(xml.encode('utf-8'))
self.assertTrue(isinstance(doc.attrib['foo'], compat_str))
self.assertTrue(isinstance(doc.attrib['spam'], compat_str))
+ self.assertTrue(isinstance(doc.find('normal').text, compat_str))
+ self.assertTrue(isinstance(doc.find('chinese').text, compat_str))
+ self.assertTrue(isinstance(doc.find('foo/bar').text, compat_str))
if __name__ == '__main__':
unittest.main()