From Dan Kenigsberg <[email protected]>:

Dan Kenigsberg has uploaded a new change for review.

Change subject: py3: v2vTests: replace StringIO.StringIO
......................................................................

py3: v2vTests: replace StringIO.StringIO

io.StringIO is the python3-compatible class, let's use it. The module is
still not importable under Python 3.

Change-Id: I0cf0ad69f5a0216f639a17bef5735254a52570c9
Signed-off-by: Dan Kenigsberg <[email protected]>
---
M tests/v2vTests.py
1 file changed, 13 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/86/67786/1

diff --git a/tests/v2vTests.py b/tests/v2vTests.py
index 5b7db9f..28826da 100644
--- a/tests/v2vTests.py
+++ b/tests/v2vTests.py
@@ -19,7 +19,7 @@
 
 from collections import namedtuple
 from contextlib import contextmanager
-from StringIO import StringIO
+from io import StringIO
 import subprocess
 import tarfile
 import zipfile
@@ -445,18 +445,18 @@
                 )
 
     def testOutputParser(self):
-        output = ('[   0.0] Opening the source -i libvirt ://roo...\n'
-                  '[   1.0] Creating an overlay to protect the f...\n'
-                  '[  88.0] Copying disk 1/2 to /tmp/v2v/0000000...\n'
-                  '    (0/100%)\r'
-                  '    (50/100%)\r'
-                  '    (100/100%)\r'
-                  '[ 180.0] Copying disk 2/2 to /tmp/v2v/100000-...\n'
-                  '    (0/100%)\r'
-                  '    (50/100%)\r'
-                  '    (100/100%)\r'
-                  '[ 256.0] Creating output metadata'
-                  '[ 256.0] Finishing off')
+        output = (u'[   0.0] Opening the source -i libvirt ://roo...\n'
+                  u'[   1.0] Creating an overlay to protect the f...\n'
+                  u'[  88.0] Copying disk 1/2 to /tmp/v2v/0000000...\n'
+                  u'    (0/100%)\r'
+                  u'    (50/100%)\r'
+                  u'    (100/100%)\r'
+                  u'[ 180.0] Copying disk 2/2 to /tmp/v2v/100000-...\n'
+                  u'    (0/100%)\r'
+                  u'    (50/100%)\r'
+                  u'    (100/100%)\r'
+                  u'[ 256.0] Creating output metadata'
+                  u'[ 256.0] Finishing off')
 
         parser = v2v.OutputParser()
         events = list(parser.parse(StringIO(output)))


-- 
To view, visit https://gerrit.ovirt.org/67786
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cf0ad69f5a0216f639a17bef5735254a52570c9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <[email protected]>
_______________________________________________
vdsm-patches mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to