Exemplo 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
Exemplo 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
Exemplo n.º 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)
Exemplo n.º 4
0
 def test_plot_cum3(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3()
     assert plt.fignum_exists(1)
Exemplo n.º 5
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')
Exemplo n.º 6
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')
Exemplo n.º 7
0
 def test_plot_cum3_axis(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3(axis=[0, 1, 0, 100])
     assert plt.fignum_exists(1)
Exemplo n.º 8
0
 def test_plot_cum3(self):
     bs = Bispectrum(self.lc)
     bs.plot_cum3()
     assert plt.fignum_exists(1)
Exemplo n.º 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')
Exemplo n.º 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')