def test_plot_matplotlib_not_installed(self): bs = Bispectrum(self.lc) with pytest.raises(ImportError) as excinfo: bs.plot_cum3() bs.plot_mag() bs.plot_phase() message = str(excinfo.value) assert "Matplotlib required for plot()" in message
def test_plot_phase_axis(self): bs = Bispectrum(self.lc) bs.plot_phase(axis=[0, 1, 0, 100]) assert plt.fignum_exists(1)
def test_plot_phase(self): bs = Bispectrum(self.lc) bs.plot_phase() assert plt.fignum_exists(1)
def test_plot_phase_custom_filename(self): bs = Bispectrum(self.lc) bs.plot_phase(save=True, filename='phase.png') assert os.path.isfile('phase.png') os.unlink('phase.png')
def test_plot_phase_default_filename(self): bs = Bispectrum(self.lc) bs.plot_phase(save=True) assert os.path.isfile('bispec_phase.png') os.unlink('bispec_phase.png')