예제 #1
0
def test_baseobj_get_fit_parameters_nested(setup_pars):
    name = setup_pars["name"]
    del setup_pars["name"]
    obj = BaseObj(name, **setup_pars)

    name2 = name + "_2"
    obj2 = BaseObj(name2, obj=obj, **setup_pars)

    pars = obj2.get_fit_parameters()
    assert len(pars) == 4

    pars = obj.get_fit_parameters()
    assert len(pars) == 2
예제 #2
0
def test_baseobj_get_parameters(setup_pars: dict):
    name = setup_pars["name"]
    del setup_pars["name"]
    obj = BaseObj(name, **setup_pars)
    pars = obj.get_fit_parameters()
    assert isinstance(pars, list)
    assert len(pars) == 2
    par_names = [par.name for par in pars]
    assert "p2" in par_names
    assert "p3" in par_names
예제 #3
0
def test_baseobj_get_fit_parameters(setup_pars):
    name = setup_pars["name"]
    del setup_pars["name"]
    obj = BaseObj(name, **setup_pars)
    pars = obj.get_fit_parameters()
    assert len(pars) == 2