Beispiel #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
 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
Beispiel #3
0
 def test_plot_cum3_axis(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3(axis=[0, 1, 0, 100])
     assert plt.fignum_exists(1)
Beispiel #4
0
 def test_plot_cum3(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3()
     assert plt.fignum_exists(1)
 def test_plot_cum3_custom_filename(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3(save=True, filename='cum3.png')
     assert os.path.isfile('cum3.png')
     os.unlink('cum3.png')
 def test_plot_cum3_default_filename(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3(save=True)
     assert os.path.isfile('bispec_cum3.png')
     os.unlink('bispec_cum3.png')
 def test_plot_cum3_axis(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3(axis=[0, 1, 0, 100])
     assert plt.fignum_exists(1)
 def test_plot_cum3(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3()
     assert plt.fignum_exists(1)
Beispiel #9
0
 def test_plot_cum3_custom_filename(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3(save=True, filename='cum3.png')
     assert os.path.isfile('cum3.png')
     os.unlink('cum3.png')
Beispiel #10
0
 def test_plot_cum3_default_filename(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3(save=True)
     assert os.path.isfile('bispec_cum3.png')
     os.unlink('bispec_cum3.png')