diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-09-06 14:49:16 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-09-06 14:53:41 -0700 |
commit | 53f28f7857c6d79bb5f1080e0af5818b762c2e74 (patch) | |
tree | b03b68b29a10c8acde1742f78a03307b01fbc1cb /tensorflow/python/summary | |
parent | f8d4b5eae59124c9a4b01a4cc1097e1f0006137a (diff) |
Make writer_test avoid setting content to a string
That content field of the PluginData proto is going to be converted into a bytes field, and setting it to a string makes the test fail. Furthermore, the purpose of this test is to make sure that correct data is written, so setting the name of the plugin suffices.
PiperOrigin-RevId: 167776457
Diffstat (limited to 'tensorflow/python/summary')
-rw-r--r-- | tensorflow/python/summary/writer/writer_test.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/python/summary/writer/writer_test.py b/tensorflow/python/summary/writer/writer_test.py index 9d3e20e408..88ade0aac3 100644 --- a/tensorflow/python/summary/writer/writer_test.py +++ b/tensorflow/python/summary/writer/writer_test.py @@ -39,6 +39,7 @@ from tensorflow.python.summary import plugin_asset from tensorflow.python.summary import summary_iterator from tensorflow.python.summary.writer import writer from tensorflow.python.summary.writer import writer_cache +from tensorflow.python.util import compat class SummaryWriterTestCase(test.TestCase): @@ -334,11 +335,11 @@ class SummaryWriterTestCase(test.TestCase): # should strip the metadata from the second one. value = summary_pb2.Summary.Value(tag="foo", simple_value=10.0) value.metadata.plugin_data.plugin_name = "bar" - value.metadata.plugin_data.content = "... content ..." + value.metadata.plugin_data.content = compat.as_bytes("... content ...") sw.add_summary(summary_pb2.Summary(value=[value]), 10) value = summary_pb2.Summary.Value(tag="foo", simple_value=10.0) value.metadata.plugin_data.plugin_name = "bar" - value.metadata.plugin_data.content = "... content ..." + value.metadata.plugin_data.content = compat.as_bytes("... content ...") sw.add_summary(summary_pb2.Summary(value=[value]), 10) sw.close() |