[PATCH 03 of 16 eac] [py3] Feed BytesIO with bytes values

Denis Laxalde denis.laxalde at logilab.fr
Tue Oct 1 12:36:29 CEST 2019


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1569918315 -7200
#      Tue Oct 01 10:25:15 2019 +0200
# Node ID 42c46223a5cb7763976f3fc2d2e3d0c74297c416
# Parent  b74fb21d326c4b0466429054986564cf4ebe8c08
# Available At http://hg.logilab.org/review/cubes/eac
#              hg pull http://hg.logilab.org/review/cubes/eac -r 42c46223a5cb
[py3] Feed BytesIO with bytes values

diff --git a/test/test_dataimport.py b/test/test_dataimport.py
index e8e5e71..9077d74 100644
--- a/test/test_dataimport.py
+++ b/test/test_dataimport.py
@@ -446,10 +446,10 @@ class EACXMLParserTC(unittest.TestCase):
     def test_errors(self):
         log = SimpleImportLog('<dummy>')
         with self.assertRaises(dataimport.InvalidXML):
-            importer = dataimport.EACCPFImporter(BytesIO('no xml'), log, mock_)
+            importer = dataimport.EACCPFImporter(BytesIO(b'no xml'), log, mock_)
             list(importer.external_entities())
         with self.assertRaises(dataimport.MissingTag):
-            importer = dataimport.EACCPFImporter(BytesIO('<xml/>'), log, mock_)
+            importer = dataimport.EACCPFImporter(BytesIO(b'<xml/>'), log, mock_)
             list(importer.external_entities())
 
 



More information about the saem-devel mailing list