From 494bbdfced3fd8596721d12e73676c4967f452e4 Mon Sep 17 00:00:00 2001 From: Dan Moldovan Date: Mon, 8 Oct 2018 13:48:19 -0700 Subject: Allow using more than one converter in the testing harness. PiperOrigin-RevId: 216242862 --- tensorflow/python/autograph/core/converter_testing.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tensorflow/python') 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 -- cgit v1.2.3