def _write_file(self, path, config, template): outfile = open(path, 'w') \ if isinstance(path, basestring) else path # unit test hook with outfile: model_writer = RobotModelWriter(outfile, self._js_model, config) writer = HtmlFileWriter(outfile, model_writer) writer.write(template)
def _write_file(self, path, config, template): outfile = file_writer(path) \ if is_string(path) else path # unit test hook with outfile: model_writer = RobotModelWriter(outfile, self._js_model, config) writer = HtmlFileWriter(outfile, model_writer) writer.write(template)