aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/tools')
-rw-r--r--tensorflow/tools/test/BUILD15
-rw-r--r--tensorflow/tools/test/check_futures_test.py7
2 files changed, 10 insertions, 12 deletions
diff --git a/tensorflow/tools/test/BUILD b/tensorflow/tools/test/BUILD
index 23d9cc6444..bdf4037ca9 100644
--- a/tensorflow/tools/test/BUILD
+++ b/tensorflow/tools/test/BUILD
@@ -95,11 +95,10 @@ filegroup(
visibility = ["//tensorflow:__subpackages__"],
)
-# TODO(irving): Reenable once the all_opensource_files mess is resolved.
-# py_test(
-# name = "check_futures_test",
-# size = "small",
-# srcs = ["check_futures_test.py"],
-# data = ["//tensorflow:all_opensource_files"],
-# srcs_version = "PY2AND3",
-# )
+py_test(
+ name = "check_futures_test",
+ size = "small",
+ srcs = ["check_futures_test.py"],
+ data = ["//tensorflow:all_opensource_files"],
+ srcs_version = "PY2AND3",
+)
diff --git a/tensorflow/tools/test/check_futures_test.py b/tensorflow/tools/test/check_futures_test.py
index a50cbda16d..2f7ebc418c 100644
--- a/tensorflow/tools/test/check_futures_test.py
+++ b/tensorflow/tools/test/check_futures_test.py
@@ -31,6 +31,8 @@ import fnmatch
import os
import re
+import six
+
BASE_DIR = os.path.normpath(os.path.join(__file__, '../../..'))
FUTURES_PATTERN = re.compile(r'^from __future__ import (\w+)\s*$')
FUTURES_PATTERN_2 = re.compile(
@@ -39,14 +41,11 @@ REQUIRED_FUTURES = frozenset(['absolute_import', 'division', 'print_function'])
WHITELIST = [
'python/platform/control_imports.py',
- 'python/platform/default/_init.py', # TODO(irving): Will vanish soon
'tools/docker/jupyter_notebook_config.py',
]
# Tests that must *not* import division
OLD_DIVISION = [
- # TODO(irving): Remove word2vec after 0.6.0 is released.
- 'examples/tutorials/word2vec/word2vec_basic.py',
'python/framework/tensor_shape_div_test.py',
'python/kernel_tests/division_past_test.py',
]
@@ -55,7 +54,7 @@ OLD_DIVISION = [
def check_file(path, old_division):
futures = set()
count = 0
- for line in open(path):
+ for line in open(path, encoding='utf-8') if six.PY3 else open(path):
count += 1
m = FUTURES_PATTERN.match(line)
if m: