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_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_mag_axis(self): bs = Bispectrum(self.lc) bs.plot_mag(axis=[0, 1, 0, 100]) assert plt.fignum_exists(1)
def test_plot_mag(self): bs = Bispectrum(self.lc) bs.plot_mag() assert plt.fignum_exists(1)
def test_plot_mag_default_filename(self): bs = Bispectrum(self.lc) bs.plot_mag(save=True) assert os.path.isfile('bispec_mag.png') os.unlink('bispec_mag.png')
def test_plot_mag_axis(self): bs = Bispectrum(self.lc) bs.plot_mag(axis=[0, 1, 0, 100]) assert plt.fignum_exists(1)
def test_plot_mag(self): bs = Bispectrum(self.lc) bs.plot_mag() assert plt.fignum_exists(1)
def test_plot_mag_default_filename(self): bs = Bispectrum(self.lc) bs.plot_mag(save=True) assert os.path.isfile('bispec_mag.png') os.unlink('bispec_mag.png')