(self)
| 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( |
nothing calls this directly
no test coverage detected