Beispiel #1
0
def test_set_log():
    session = Session()
    assert not session.get_data_plot_prefs()['xlog']
    assert not session.get_data_plot_prefs()['ylog']
    session.set_xlog()
    assert session.get_data_plot_prefs()['xlog']
    session.set_ylog()
    assert session.get_data_plot_prefs()['ylog']
    session.set_xlinear()
    assert not session.get_data_plot_prefs()['xlog']
    session.set_ylinear()
    assert not session.get_data_plot_prefs()['ylog']
Beispiel #2
0
def test_set_log():
    session = Session()
    assert not session.get_data_plot_prefs()['xlog']
    assert not session.get_data_plot_prefs()['ylog']
    session.set_xlog()
    assert session.get_data_plot_prefs()['xlog']
    session.set_ylog()
    assert session.get_data_plot_prefs()['ylog']
    session.set_xlinear()
    assert not session.get_data_plot_prefs()['xlog']
    session.set_ylinear()
    assert not session.get_data_plot_prefs()['ylog']
Beispiel #3
0
def test_set_log_does_not_change_other_sessions():
    """The plot preferences in different sessions are distinct.
    """

    session1 = Session()
    session2 = Session()
    session1.set_xlog()
    session2.set_ylog()

    assert session1.get_data_plot_prefs()['xlog']
    assert not session1.get_data_plot_prefs()['ylog']
    assert not session2.get_data_plot_prefs()['xlog']
    assert session2.get_data_plot_prefs()['ylog']
Beispiel #4
0
def test_set_log_clean():
    """Cleaning the session resets the plot preferences."""

    # relies on the tests in test_set_log
    session = Session()
    session.set_xlog()
    session.set_ylog()

    session.clean()
    assert not session.get_data_plot_prefs()['xlog']
    assert not session.get_data_plot_prefs()['ylog']
Beispiel #5
0
print(repr(s.get_data()))

print("# get_data()")
print(s.get_data())

print("# get_stat_name/get_method_name")
print(s.get_stat_name())
print(s.get_method_name())

s.set_stat('cash')
s.set_method('simplex')

s.set_source('const1d.mdl')

print("# mdl")
print(mdl)

print("# get_source")
print(s.get_source())

print("# fit")
s.fit()

print("# get_fit_results")
r = s.get_fit_results()
print(r)

s.get_data_plot_prefs()['yerrorbars'] = False
print("--> call")
print("s.plot_fit()")