Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [✓] 10:53:05(1501091585) [711791c79b] (tensorflow-nightly-20170726)
- wchargin@wchargin:~/git/tensorboard
- $ git status
- HEAD detached at origin/master
- Changes not staged for commit:
- (use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
- modified: tensorboard/plugins/text/text_plugin_test.py
- no changes added to commit (use "git add" and/or "git commit -a")
- [✓] 10:53:07(1501091587) [711791c79b] (tensorflow-nightly-20170726)
- wchargin@wchargin:~/git/tensorboard
- $ git diff
- diff --git a/tensorboard/plugins/text/text_plugin_test.py b/tensorboard/plugins/text/text_plugin_test.py
- index d8967f6..fa2b5e4 100644
- --- a/tensorboard/plugins/text/text_plugin_test.py
- +++ b/tensorboard/plugins/text/text_plugin_test.py
- @@ -353,6 +353,40 @@ class TextPluginTest(tf.test.TestCase):
- scalar_expected = '<p>foo</p>'
- self.assertEqual(convert(scalar), scalar_expected)
- + table = textwrap.dedent("""\
- + An | Example | Table
- + --- | --- | ---
- + A | B | C
- + 1 | 2 | 3
- + """)
- +
- + table_converted = textwrap.dedent("""\
- + <table>
- + <thead>
- + <tr>
- + <th>An</th>
- + <th>Example</th>
- + <th>Table</th>
- + </tr>
- + </thead>
- + <tbody>
- + <tr>
- + <td>A</td>
- + <td>B</td>
- + <td>C</td>
- + </tr>
- + <tr>
- + <td>1</td>
- + <td>2</td>
- + <td>3</td>
- + </tr>
- + </tbody>
- + </table>""")
- +
- + scalar = np.array(table)
- + scalar_expected = table_converted
- + self.assertEqual(convert(scalar), scalar_expected)
- +
- vector = np.array(['foo', 'bar'])
- vector_expected = textwrap.dedent("""\
- <table>
- [✓] 10:53:08(1501091588) [711791c79b] (tensorflow-nightly-20170726)
- wchargin@wchargin:~/git/tensorboard
- $ bazel test tensorboard/plugins/text:text_plugin_test
- INFO: Found 1 test target...
- Target //tensorboard/plugins/text:text_plugin_test up-to-date:
- bazel-bin/tensorboard/plugins/text/text_plugin_test
- INFO: Elapsed time: 1.695s, Critical Path: 1.42s
- //tensorboard/plugins/text:text_plugin_test PASSED in 1.4s
- Executed 1 out of 1 test: 1 test passes.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement