提交 ded01d29 编写于 作者: A Andrew Selle 提交者: TensorFlower Gardener

Python3 Compatibility for tf_upgrade_test.py

Change: 144279869
上级 2bdf0b4e
......@@ -17,7 +17,7 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import StringIO
import six
from tensorflow.python.framework import test_util
from tensorflow.python.platform import test as test_lib
from tensorflow.tools.compatibility import tf_upgrade
......@@ -32,8 +32,8 @@ class TestUpgrade(test_util.TensorFlowTestCase):
"""
def _upgrade(self, old_file_text):
in_file = StringIO.StringIO(old_file_text)
out_file = StringIO.StringIO()
in_file = six.StringIO(old_file_text)
out_file = six.StringIO()
upgrader = tf_upgrade.TensorFlowCodeUpgrader()
count, report, errors = (
upgrader.process_opened_file("test.py", in_file,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册