test/integration/test_b2_command_line.py
def should_fail(self, args, expected_pattern):
        """
        Runs the command-line with the given args, expecting the given pattern
        to appear in stderr.
        """
        status, stdout, stderr = run_command(self.command, args)
        if status == 0:
            print('ERROR: should have failed')
            sys.exit(1)
        if re.search(expected_pattern, stdout + stderr) is None:
            print(expected_pattern)
            print(stdout + stderr)
            error_and_exit('did not match pattern: ' + expected_pattern)

        Runs the command-line with the given args, expecting the given pattern
        to appear in stderr.
        
Runs the command-line with the given args, expecting the given pattern
to appear in stderr.
Runs the command - line with the given args expecting the given pattern to appear in stderr .
def should_fail(self, args, expected_pattern):
        status, stdout, stderr = run_command(self.command, args)
        if status == 0:
            print('ERROR: should have failed')
            sys.exit(1)
        if re.search(expected_pattern, stdout + stderr) is None:
            print(expected_pattern)
            print(stdout + stderr)
            error_and_exit('did not match pattern: ' + expected_pattern)
def should_fail ( self , args , expected_pattern ) : status , stdout , stderr = run_command ( self . command , args ) if status == 0 : print ( 'ERROR: should have failed' ) sys . exit ( 1 ) if re . search ( expected_pattern , stdout + stderr ) is None : print ( expected_pattern ) print ( stdout + stderr ) error_and_exit ( 'did not match pattern: ' + expected_pattern )
Runs the command-line with the given args, expecting the given pattern
to appear in stderr.
Runs the command - line with the given args expecting the given pattern to appear in stderr .
"""
        Runs the command-line with the given args, expecting the given pattern
        to appear in stderr.
        """
self
args
expected_pattern