aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/tests/_result.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/grpcio/tests/_result.py')
-rw-r--r--src/python/grpcio/tests/_result.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/python/grpcio/tests/_result.py b/src/python/grpcio/tests/_result.py
index 0670be921f..065153f0c3 100644
--- a/src/python/grpcio/tests/_result.py
+++ b/src/python/grpcio/tests/_result.py
@@ -1,4 +1,4 @@
-# Copyright 2015, Google Inc.
+# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,8 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import cStringIO as StringIO
+from __future__ import absolute_import
+
import collections
import itertools
import traceback
@@ -35,6 +36,7 @@ import unittest
from xml.etree import ElementTree
import coverage
+from six import moves
from tests import _loader
@@ -356,7 +358,7 @@ def _traceback_string(type, value, trace):
Returns:
str: Formatted exception descriptive string.
"""
- buffer = StringIO.StringIO()
+ buffer = moves.cStringIO()
traceback.print_exception(type, value, trace, file=buffer)
return buffer.getvalue()