Skip to content

Commit

Permalink
Add a test case for object's group detail display in help screen.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 252922833
Change-Id: Iaf6bdcb0391895f6ddf396c4ab5c2b9deef25cbe
  • Loading branch information
joejoevictor authored and copybara-github committed Jun 12, 2019
1 parent 9e65820 commit f64f887
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fire/helptext_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,22 @@ def testHelpTextBoldCommandName(self):
help_screen)
self.assertIn(formatting.Bold('print_msg') + '\n', help_screen)

def testHelpTextObjectWithGroupAndValues(self):
component = tc.TypedProperties()
t = trace.FireTrace(component, name='TypedProperties')
info = inspectutils.Info(component)
help_screen = helptext.HelpText(
component=component, info=info, trace=t, verbose=True)
print(help_screen)
self.assertIn('GROUPS', help_screen)
self.assertIn('GROUP is one of the following:', help_screen)
self.assertIn(
'charlie\n Class with functions that have default arguments.',
help_screen)
self.assertIn('VALUES', help_screen)
self.assertIn('VALUE is one of the following:', help_screen)
self.assertIn('alpha', help_screen)


class UsageTest(testutils.BaseTestCase):

Expand Down

0 comments on commit f64f887

Please sign in to comment.