Esempio n. 1
0
 def test_extra_load(self):
     with mock.patch.object(self.fig, "savefig") as _save:
         viz.savefig(self.fig, "test_extra", extra="subdir", load=True)
         _save.assert_called_once_with(
             os.path.join("output", "img", "subdir", "test_extra-load.png"),
             dpi=300,
             transparent=True,
             bbox_inches="tight",
         )
Esempio n. 2
0
 def test_pdf(self):
     with mock.patch.object(self.fig, "savefig") as _save:
         viz.savefig(self.fig, "test_pdf", asPNG=False, asPDF=True)
         _save.assert_called_once_with(
             os.path.join("output", "img", "test_pdf.pdf"), dpi=300, transparent=True, bbox_inches="tight"
         )