Exemplo n.º 1
0
 def test_ustrandplot_to_file(self):
     """ustrandplot: write PNG to file
     """
     outfile = os.path.join(self.wd, "ustrandplot.png")
     self.assertEqual(ustrandplot(self.fastq_strand_txt, outfile=outfile),
                      outfile)
     self.assertEqual(encode_png(outfile), self.png_base64_data)
Exemplo n.º 2
0
 def test_ustackedbar_to_file(self):
     """ustackedbar: write PNG to file
     """
     outfile = os.path.join(self.wd, "ustackedbar.png")
     self.assertEqual(
         ustackedbar(
             (3, 4, 2),
             outfile=outfile,
             colors=((0, 0, 255), (100, 149, 237), (255, 255, 255))),
         outfile)
     self.assertEqual(encode_png(outfile), self.png_base64_data)
Exemplo n.º 3
0
 def test_uscreenplot_to_file(self):
     """uscreenplot: write PNG to file
     """
     outfile = os.path.join(self.wd, "uscreenplot.png")
     self.assertEqual(uscreenplot(self.screens, outfile=outfile), outfile)
     self.assertEqual(encode_png(outfile), self.png_base64_data)
Exemplo n.º 4
0
 def test_enode_png(self):
     """
     encode_png: turn PNG file into Base64 encoded string
     """
     self.assertEqual(encode_png(self.png),
                      "data:image/png;base64,%s" % self.png_base64_data)