diff options
Diffstat (limited to 'tensorflow/python/data/kernel_tests/map_dataset_op_test.py')
-rw-r--r-- | tensorflow/python/data/kernel_tests/map_dataset_op_test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tensorflow/python/data/kernel_tests/map_dataset_op_test.py b/tensorflow/python/data/kernel_tests/map_dataset_op_test.py index 0ecd821e9e..637bde9ae4 100644 --- a/tensorflow/python/data/kernel_tests/map_dataset_op_test.py +++ b/tensorflow/python/data/kernel_tests/map_dataset_op_test.py @@ -666,6 +666,13 @@ class MapDatasetTest(test.TestCase): "currently support nested datasets as outputs."): _ = dataset.map(dataset_ops.Dataset.from_tensor_slices) + def testReturnValueError(self): + dataset = dataset_ops.Dataset.from_tensors([1.0, 2.0, 3.0]) + with self.assertRaisesRegexp( + TypeError, r"Unsupported return value from function passed to " + r"Dataset.map\(\): None."): + _ = dataset.map(lambda x: None) + class MapDatasetBenchmark(test.Benchmark): |