[PATCH 12 of 17 seda] [py3] Force XML serialization to unicode in profile generation tests

Denis Laxalde denis.laxalde at logilab.fr
Wed Oct 2 16:06:40 CEST 2019


diff --git a/test/test_profile_generation.py b/test/test_profile_generation.py
index f0964bd..5f6cbe2 100644
--- a/test/test_profile_generation.py
+++ b/test/test_profile_generation.py
@@ -586,7 +586,8 @@ class SEDA2RNGExportTC(RelaxNGTestMixin,
 
             profile = self.profile_etree(transfer)
             mt = self.get_element(profile, 'MimeType')
-            self.assertEqual('\n'.join(etree.tostring(mt, pretty_print=True).splitlines()[1:-1]),
+            self.assertEqual('\n'.join(etree.tostring(mt, encoding=text_type,
+                                                      pretty_print=True).splitlines()[1:-1]),
                              '''\
   <rng:choice>
     <rng:value type="token">application/msword</rng:value>



More information about the saem-devel mailing list