diff options
author | Dan Moldovan <mdan@google.com> | 2018-10-08 13:48:19 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-08 13:55:34 -0700 |
commit | 494bbdfced3fd8596721d12e73676c4967f452e4 (patch) | |
tree | 8d10e0d96ce8a5ef703b025eb3236e41ed7c0fe9 /tensorflow/python | |
parent | b052c51374f558c25a29c70918d79205dfec808b (diff) |
Allow using more than one converter in the testing harness.
PiperOrigin-RevId: 216242862
Diffstat (limited to 'tensorflow/python')
-rw-r--r-- | tensorflow/python/autograph/core/converter_testing.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tensorflow/python/autograph/core/converter_testing.py b/tensorflow/python/autograph/core/converter_testing.py index dc2d419d34..fcdbd0a82c 100644 --- a/tensorflow/python/autograph/core/converter_testing.py +++ b/tensorflow/python/autograph/core/converter_testing.py @@ -128,7 +128,13 @@ class TestCase(test.TestCase): @contextlib.contextmanager def converted(self, entity, converter_module, namespace, *tf_symbols): node, ctx = self.prepare(entity, namespace) - node = converter_module.transform(node, ctx) + + if not isinstance(converter_module, (list, tuple)): + converter_module = (converter_module,) + for m in converter_module: + node = m.transform(node, ctx) + node = converter.standard_analysis(node, ctx, is_initial=True) + with self.compiled(node, namespace, *tf_symbols) as result: yield result |