Ejemplo n.º 1
0
 def _url_from_path(self, source, destination):
     if not destination:
         return None
     return get_link_path(destination, os.path.dirname(source))
Ejemplo n.º 2
0
 def _embed_screenshot(self, path, width):
     link = utils.get_link_path(path, self._log_dir)
     logger.info('<a href="%s"><img src="%s" width="%s"></a>' %
                 (link, link, width),
                 html=True)
Ejemplo n.º 3
0
 def _link_screenshot(self, path):
     link = utils.get_link_path(path, self._log_dir)
     logger.info("Screenshot saved to '<a href=\"%s\">%s</a>'." %
                 (link, path),
                 html=True)
Ejemplo n.º 4
0
 def _get_relative_source(self, source):
     if not source or not self._output_path:
         return ""
     return get_link_path(source, os.path.dirname(self._output_path))
Ejemplo n.º 5
0
 def relative_source(self, source):
     rel_source = get_link_path(source, self._log_dir) \
         if self._log_dir and source and os.path.exists(source) else ''
     return self.string(rel_source)
Ejemplo n.º 6
0
 def _get_relative_source(self, source):
     if not source or not self._output_path:
         return ''
     return get_link_path(source, os.path.dirname(self._output_path))
Ejemplo n.º 7
0
 def _link_screenshot(self, path):
     link = utils.get_link_path(path, self._log_dir)
     logger.info("Screenshot saved to '<a href=\"%s\">%s</a>'."
                 % (link, path), html=True)
Ejemplo n.º 8
0
 def _embed_screenshot(self, path, width):
     link = utils.get_link_path(path, self._log_dir)
     logger.info('<a href="%s"><img src="%s" width="%s"></a>'
                 % (link, link, width), html=True)