MCPcopy
hub / github.com/google/python-fire / testUsageOutputMethod

Method testUsageOutputMethod

fire/helptext_test.py:462–474  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

460 textwrap.dedent(expected_output).lstrip('\n'))
461
462 def testUsageOutputMethod(self):
463 component = tc.NoDefaults().double
464 t = trace.FireTrace(component, name='NoDefaults')
465 t.AddAccessedProperty(component, 'double', ['double'], None, None)
466 usage_output = helptext.UsageText(component, trace=t, verbose=False)
467 expected_output = """
468 Usage: NoDefaults double COUNT
469
470 For detailed information on this command, run:
471 NoDefaults double --help"""
472 self.assertEqual(
473 usage_output,
474 textwrap.dedent(expected_output).lstrip('\n'))
475
476 def testUsageOutputFunctionWithHelp(self):
477 component = tc.function_with_help

Callers

nothing calls this directly

Calls 1

AddAccessedPropertyMethod · 0.95

Tested by

no test coverage detected