Ejemplo n.º 1
0
    def test_plot_result1(self):
        # Quick run `design` with all verb/plot on, just to check that no
        # errors occur. Actually plots are checked in test below and the other
        # tests.
        dat2 = DATA['case2'][()]
        fdesign.design(fI=fdesign.j0_1(5), verb=2, plot=2, **dat2[0])

        # plot_result for min amplitude
        dat1 = DATA['case1'][()]
        fdesign.plot_result(dat1[1], dat1[2], prntres=True)
        return plt.gcf()
Ejemplo n.º 2
0
 def test_plot_result(self, capsys):
     # Check it doesn't fail, message is correct, and input doesn't matter
     fdesign.plot_result(0, 1)
     out, _ = capsys.readouterr()
     assert "* WARNING :: `matplotlib` is not installed, no " in out
Ejemplo n.º 3
0
 def test_plot_result3(self):
     switch_off_matplotlib_agg_warning()
     # plot_result several shifts one spacing for max r
     dat6 = DATA['case6'][()]
     fdesign.plot_result(dat6[1], dat6[2])
     return plt.gcf()
Ejemplo n.º 4
0
 def test_plot_result2(self):
     switch_off_matplotlib_agg_warning()
     # plot_result one shift several spacings
     dat5 = DATA['case5'][()]
     fdesign.plot_result(dat5[1], dat5[2])
     return plt.gcf()
Ejemplo n.º 5
0
 def test_plot_result3(self):
     # plot_result several shifts one spacing for max r
     dat6 = DATA['case6'][()]
     fdesign.plot_result(dat6[1], dat6[2])
     return plt.gcf()
Ejemplo n.º 6
0
 def test_plot_result2(self):
     # plot_result one shift several spacings
     dat5 = DATA['case5'][()]
     fdesign.plot_result(dat5[1], dat5[2])
     return plt.gcf()