Misc Python 3 compatibility fixes
Python 3 renames StringIO -> io. Use six to deal with this change. Introduces new test dependency on six for StringIO. Change-Id: Ia875b7fcbb976599053970ef79ed3f3474626bad
This commit is contained in:
parent
de604832c3
commit
4292155e3e
@ -14,13 +14,13 @@
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import StringIO
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
import testtools
|
||||
|
||||
from os_testr.tests import base
|
||||
from six import StringIO
|
||||
|
||||
DEVNULL = open(os.devnull, 'wb')
|
||||
|
||||
@ -47,8 +47,8 @@ class TestReturnCodes(base.TestCase):
|
||||
shutil.copy('os_testr/tests/files/setup.cfg', self.setup_cfg_file)
|
||||
shutil.copy('os_testr/tests/files/__init__.py', self.init_file)
|
||||
|
||||
self.stdout = StringIO.StringIO()
|
||||
self.stderr = StringIO.StringIO()
|
||||
self.stdout = StringIO()
|
||||
self.stderr = StringIO()
|
||||
# Change directory, run wrapper and check result
|
||||
self.addCleanup(os.chdir, os.path.abspath(os.curdir))
|
||||
os.chdir(self.directory)
|
||||
|
@ -11,3 +11,4 @@ oslosphinx>=2.2.0 # Apache-2.0
|
||||
oslotest>=1.2.0 # Apache-2.0
|
||||
testscenarios>=0.4
|
||||
ddt>=0.4.0
|
||||
six>=1.9.0
|
||||
|
Loading…
Reference in New Issue
Block a user