def run_examples():
    exceptions = []
    failures = 0
    for input_command, expected_output, exit_code in INPUTS_AND_OUTPUTS:
        print '\t', input_command,
        remove_all_pycs(os.path.abspath(os.path.dirname(__file__)))
        try:
            process = subprocess.Popen(input_command,
                                   stdout=subprocess.PIPE,
                                   shell=True)
            out = process.communicate()[0]+'\n'
            out |should_be.equal_to| expected_output
            process.wait() |should_be.equal_to| exit_code
            print '- OK'
        except __HOLE__, e:
            print '- FAIL'
            print e
            failures += 1
    return failures
dataset/ETHPy150Open hltbra/pycukes/specs/console_examples/run_examples.py/run_examples