diff options
Diffstat (limited to 'tensorflow/python/autograph/pyct/cfg_test.py')
-rw-r--r-- | tensorflow/python/autograph/pyct/cfg_test.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tensorflow/python/autograph/pyct/cfg_test.py b/tensorflow/python/autograph/pyct/cfg_test.py index bd82e70f7d..d5870124bc 100644 --- a/tensorflow/python/autograph/pyct/cfg_test.py +++ b/tensorflow/python/autograph/pyct/cfg_test.py @@ -964,6 +964,22 @@ class AstToCfgTest(test.TestCase): ), ) + def test_lambda_basic(self): + + def test_fn(a): + a = lambda b: a + b + return a + + graph, = self._build_cfg(test_fn).values() + + self.assertGraphMatches( + graph, + ( + ('a', 'a = lambda b: a + b', 'return a'), + ('a = lambda b: a + b', 'return a', None), + ), + ) + if __name__ == '__main__': test.main() |