コード例 #1
0
ファイル: xmllogger.py プロジェクト: Garjy/RIDE
 def _get_writer(self, path, generator):
     if not path:
         return NullMarkupWriter()
     try:
         writer = XmlWriter(path, encoding='UTF-8', write_empty=False)
     except EnvironmentError as err:
         raise DataError("Opening output file '%s' failed: %s" %
                         (path, err.strerror))
     writer.start('robot', {'generator': get_full_version(generator),
                            'generated': get_timestamp()})
     return writer
コード例 #2
0
 def _get_writer(self, path, generator):
     if not path:
         return NullMarkupWriter()
     try:
         writer = XmlWriter(path, encoding='UTF-8', write_empty=False)
     except EnvironmentError as err:
         raise DataError("Opening output file '%s' failed: %s" %
                         (path, err.strerror))
     writer.start('robot', {
         'generator': get_full_version(generator),
         'generated': get_timestamp()
     })
     return writer
コード例 #3
0
 def write(self, output):
     writer = XUnitFileWriter(XmlWriter(output), self._skip_noncritical)
     self._execution_result.visit(writer)
コード例 #4
0
ファイル: xmlwriter.py プロジェクト: HelioGuilherme66/RIDE
 def write(self, libdoc, outfile):
     writer = XmlWriter(outfile)
     writer.start('keywordspec', {'name': libdoc.name, 'type': libdoc.type,
                                  'format': libdoc.doc_format,
                                  'generated': get_timestamp(millissep=None)})
     writer.element('version', libdoc.version)
     writer.element('scope', libdoc.scope)
     writer.element('namedargs', 'yes' if libdoc.named_args else 'no')
     writer.element('doc', libdoc.doc)
     self._write_keywords('init', libdoc.inits, writer)
     self._write_keywords('kw', libdoc.keywords, writer)
     writer.end('keywordspec')
     writer.close()
コード例 #5
0
 def write(self, libdoc, outfile):
     writer = XmlWriter(outfile)
     writer.start(
         'keywordspec', {
             'name': libdoc.name,
             'type': libdoc.type,
             'format': libdoc.doc_format,
             'generated': get_timestamp(millissep=None)
         })
     writer.element('version', libdoc.version)
     writer.element('scope', libdoc.scope)
     writer.element('namedargs', 'yes' if libdoc.named_args else 'no')
     writer.element('doc', libdoc.doc)
     self._write_keywords('init', libdoc.inits, writer)
     self._write_keywords('kw', libdoc.keywords, writer)
     writer.end('keywordspec')
     writer.close()