@then(u'the command output should contain exactly "{text}"')
def step_command_output_should_contain_exactly_text(context, text):
 expected_text = text
 if (('{__WORKDIR__}' in text) or ('{__CWD__}' in text)):
  expected_text = textutil.template_substitute(text, __WORKDIR__=posixpath_normpath(context.workdir), __CWD__=posixpath_normpath(os.getcwd()))
 actual_output = context.command_result.output
 textutil.assert_text_should_contain_exactly(actual_output, expected_text)

@ then ( u'the command output should contain exactly "{text}"' ) def step_command_output_should_contain_exactly_text ( context , text ) : expected_text = text if ( ( '{__WORKDIR__}' in text ) or ( '{__CWD__}' in text ) ) : expected_text = textutil . template_substitute ( text , __WORKDIR__ = posixpath_normpath ( context . workdir ) , __CWD__ = posixpath_normpath ( os . getcwd ( ) ) ) actual_output = context . command_result . output textutil . assert_text_should_contain_exactly ( actual_output , expected_text )
verifies that the command output of the last command contains the expected text .