@@ -661,16 +661,17 @@ def test_prints_version_WHEN_called_GIVEN_version_argument(self):
661661 theResult = False
662662 self .assertTrue (theResult , str ("""Could Not find version from multicast --version""" ))
663663
664- def _validate_help_output (self , args ) :
664+ def _validate_help_output (self , args : list ) -> bool :
665665 """
666666 Helper method to validate help command output.
667667
668668 Args:
669- args: List of command arguments to execute
669+ args (list) -- List of command arguments to execute
670670
671671 Returns:
672672 bool: True if validation passes, False otherwise
673673 """
674+ usageText = "usage:"
674675 theOutputtxt = context .checkPythonCommand (args , stderr = subprocess .STDOUT )
675676 subResult = False
676677 try :
@@ -679,12 +680,12 @@ def _validate_help_output(self, args):
679680 except UnicodeDecodeError :
680681 theOutputtxt = str (repr (bytes (theOutputtxt )))
681682 self .assertIsNotNone (theOutputtxt )
682- self .assertIn (str ("usage:" ), str (theOutputtxt ))
683- if str ("usage:" ) in str (theOutputtxt ):
683+ self .assertIn (str (usageText ), str (theOutputtxt ))
684+ if str (usageText ) in str (theOutputtxt ):
684685 subResult = True
685686 else :
686687 context .debugUnexpectedOutput (
687- str ("usage:" ), str (theOutputtxt ), self ._thepython
688+ str (usageText ), str (theOutputtxt ), self ._thepython
688689 )
689690 return subResult
690691
0 commit comments