[Python-modules-commits] [python-prov] 01/14: test_xml: decode() buffers to work with py3 also

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Dec 13 12:39:43 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository python-prov.

commit 33febe6e8aa51e8dd570b3a2933e4e172da80505
Author: Igor Gnatenko <i.gnatenko.brain at gmail.com>
Date:   Sun Dec 6 23:06:31 2015 +0100

    test_xml: decode() buffers to work with py3 also
    
    
    Signed-off-by: Igor Gnatenko <i.gnatenko.brain at gmail.com>
---
 prov/tests/test_xml.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/prov/tests/test_xml.py b/prov/tests/test_xml.py
index 79fb7eb..533b967 100644
--- a/prov/tests/test_xml.py
+++ b/prov/tests/test_xml.py
@@ -64,13 +64,13 @@ def compare_xml(doc1, doc2):
     buf = io.BytesIO()
     obj1.write_c14n(buf)
     buf.seek(0, 0)
-    str1 = buf.read()
+    str1 = buf.read().decode()
     str1 = [_i.strip() for _i in str1.splitlines() if _i.strip()]
 
     buf = io.BytesIO()
     obj2.write_c14n(buf)
     buf.seek(0, 0)
-    str2 = buf.read()
+    str2 = buf.read().decode()
     str2 = [_i.strip() for _i in str2.splitlines() if _i.strip()]
 
     unified_diff = difflib.unified_diff(str1, str2)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-prov.git



More information about the Python-modules-commits mailing list