MCPcopy Index your code
hub / github.com/tensorflow/tensorboard / testSubcommand

Method testSubcommand

tensorboard/program_test.py:221–234  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

219 self.assertEqual(flags.path_prefix, "/x") # fixed by core_plugin
220
221 def testSubcommand(self):
222 def define_flags(parser):
223 parser.add_argument("--hello")
224
225 tb = program.TensorBoard(
226 plugins=[core_plugin.CorePluginLoader],
227 assets_zip_provider=fake_asset_provider,
228 subcommands=[_TestSubcommand(define_flags=define_flags)],
229 )
230 tb.configure(("tb", "test", "--hello", "world"))
231 self.assertEqual(tb.main(), 0)
232 _TestSubcommand.run.assert_called_once()
233 flags = _TestSubcommand.run.call_args[0][0]
234 self.assertEqual(flags.hello, "world")
235
236 def testSubcommand_ExitCode(self):
237 tb = program.TensorBoard(

Callers

nothing calls this directly

Calls 3

configureMethod · 0.95
mainMethod · 0.95
_TestSubcommandClass · 0.85

Tested by

no test coverage detected