Change to using resource_loader to find in-tree files.
PiperOrigin-RevId: 292043928 Change-Id: I4e71326d2daee6fac13e4600cb9f400af10571bb
This commit is contained in:
parent
d064c6fc9a
commit
8a1fa9c9bb
@ -25,6 +25,7 @@ import sys
|
|||||||
from tensorflow import python as _tf_for_api_traversal
|
from tensorflow import python as _tf_for_api_traversal
|
||||||
from tensorflow.lite.python import lite as _tflite_for_api_traversal
|
from tensorflow.lite.python import lite as _tflite_for_api_traversal
|
||||||
# pylint: enable=unused-import
|
# pylint: enable=unused-import
|
||||||
|
from tensorflow.python.platform import resource_loader
|
||||||
from tensorflow.python.platform import test
|
from tensorflow.python.platform import test
|
||||||
from tensorflow.python.util import tf_decorator
|
from tensorflow.python.util import tf_decorator
|
||||||
|
|
||||||
@ -158,8 +159,8 @@ class OutputInitFilesTest(test.TestCase):
|
|||||||
def test_V2_init_files(self):
|
def test_V2_init_files(self):
|
||||||
modules = _get_modules(
|
modules = _get_modules(
|
||||||
'tensorflow', '_tf_api_names', '_tf_api_constants')
|
'tensorflow', '_tf_api_names', '_tf_api_constants')
|
||||||
file_path = (
|
file_path = resource_loader.get_path_to_datafile(
|
||||||
'tensorflow/python/tools/api/generator/api_init_files.bzl')
|
'api_init_files.bzl')
|
||||||
paths = _get_files_set(
|
paths = _get_files_set(
|
||||||
file_path, '# BEGIN GENERATED FILES', '# END GENERATED FILES')
|
file_path, '# BEGIN GENERATED FILES', '# END GENERATED FILES')
|
||||||
module_paths = set(
|
module_paths = set(
|
||||||
@ -170,8 +171,7 @@ class OutputInitFilesTest(test.TestCase):
|
|||||||
def test_V1_init_files(self):
|
def test_V1_init_files(self):
|
||||||
modules = _get_modules(
|
modules = _get_modules(
|
||||||
'tensorflow', '_tf_api_names_v1', '_tf_api_constants_v1')
|
'tensorflow', '_tf_api_names_v1', '_tf_api_constants_v1')
|
||||||
file_path = (
|
file_path = resource_loader.get_path_to_datafile(
|
||||||
'tensorflow/python/tools/api/generator/'
|
|
||||||
'api_init_files_v1.bzl')
|
'api_init_files_v1.bzl')
|
||||||
paths = _get_files_set(
|
paths = _get_files_set(
|
||||||
file_path, '# BEGIN GENERATED FILES', '# END GENERATED FILES')
|
file_path, '# BEGIN GENERATED FILES', '# END GENERATED FILES')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user