예제 #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
예제 #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
예제 #3
0
 def test_plot_phase_axis(self):
     bs = Bispectrum(self.lc)
     bs.plot_phase(axis=[0, 1, 0, 100])
     assert plt.fignum_exists(1)
예제 #4
0
 def test_plot_phase(self):
     bs = Bispectrum(self.lc)
     bs.plot_phase()
     assert plt.fignum_exists(1)
예제 #5
0
 def test_plot_phase_custom_filename(self):
     bs = Bispectrum(self.lc)
     bs.plot_phase(save=True, filename='phase.png')
     assert os.path.isfile('phase.png')
     os.unlink('phase.png')
예제 #6
0
 def test_plot_phase_default_filename(self):
     bs = Bispectrum(self.lc)
     bs.plot_phase(save=True)
     assert os.path.isfile('bispec_phase.png')
     os.unlink('bispec_phase.png')
예제 #7
0
 def test_plot_phase_axis(self):
     bs = Bispectrum(self.lc)
     bs.plot_phase(axis=[0, 1, 0, 100])
     assert plt.fignum_exists(1)
예제 #8
0
 def test_plot_phase(self):
     bs = Bispectrum(self.lc)
     bs.plot_phase()
     assert plt.fignum_exists(1)
예제 #9
0
 def test_plot_phase_custom_filename(self):
     bs = Bispectrum(self.lc)
     bs.plot_phase(save=True, filename='phase.png')
     assert os.path.isfile('phase.png')
     os.unlink('phase.png')
예제 #10
0
 def test_plot_phase_default_filename(self):
     bs = Bispectrum(self.lc)
     bs.plot_phase(save=True)
     assert os.path.isfile('bispec_phase.png')
     os.unlink('bispec_phase.png')