'Runs tidy and checks that output matches content of file `expected`.'

def run_tidy_as_script_and_check_result(self, options, input, output=TEMP_FILE, expected=None):

    tidy = (self._interpreter + [join(ROBOT_SRC, 'robot', 'tidy.py')])
    result = self.run_tidy(options, input, output, tidy)
    return self.compare_tidy_results((output or result), (expected or input))
