Example #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
Example #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
Example #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)
Example #4
0
 def test_plot_mag(self):
     bs = Bispectrum(self.lc)
     bs.plot_mag()
     assert plt.fignum_exists(1)
Example #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')
Example #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)
Example #7
0
 def test_plot_mag(self):
     bs = Bispectrum(self.lc)
     bs.plot_mag()
     assert plt.fignum_exists(1)
Example #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')