Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
 def test_plot_mag_axis(self):
     bs = Bispectrum(self.lc)
     bs.plot_mag(axis=[0, 1, 0, 100])
     assert plt.fignum_exists(1)
Ejemplo n.º 4
0
 def test_plot_mag(self):
     bs = Bispectrum(self.lc)
     bs.plot_mag()
     assert plt.fignum_exists(1)
Ejemplo n.º 5
0
 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')
Ejemplo n.º 6
0
 def test_plot_mag_axis(self):
     bs = Bispectrum(self.lc)
     bs.plot_mag(axis=[0, 1, 0, 100])
     assert plt.fignum_exists(1)
Ejemplo n.º 7
0
 def test_plot_mag(self):
     bs = Bispectrum(self.lc)
     bs.plot_mag()
     assert plt.fignum_exists(1)
Ejemplo n.º 8
0
 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')