From a8b55ac0ce4f74819e3e8a91918e19d47f89a875 Mon Sep 17 00:00:00 2001 From: Lu lei Date: Wed, 7 Sep 2016 16:50:06 +0800 Subject: [PATCH] Remove six.moves module Python 3 reorganized the standard library and moved several functions to different modules. Six provides a consistent interface to them through the fake six.moves module. But six.StringIO is an alias for StringIO.StringIO in Python 2 and io.StringIO in Python 3. So we don't need six.moves.StringIO() any more, we use six.StringIO() directly. Here is links :http://pythonhosted.org/six/#module-six.moves Change-Id: I44dbe915820ba4b5ffc0e34812fadc3d905542d1 --- senlinclient/tests/unit/test_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/senlinclient/tests/unit/test_utils.py b/senlinclient/tests/unit/test_utils.py index 0fd2a27c..89878b25 100644 --- a/senlinclient/tests/unit/test_utils.py +++ b/senlinclient/tests/unit/test_utils.py @@ -20,14 +20,13 @@ from heatclient.common import template_utils from senlinclient.common import exc from senlinclient.common.i18n import _ from senlinclient.common import utils -from six import moves class CaptureStdout(object): """Context manager for capturing stdout from statements in its block.""" def __enter__(self): self.real_stdout = sys.stdout - self.stringio = moves.StringIO() + self.stringio = six.StringIO() sys.stdout = self.stringio return self