Python3 Compatibility for tf_upgrade_test.py
Change: 144279869
This commit is contained in:
parent
2bdf0b4e19
commit
ded01d2902
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user