def test_set_param_error_k_type():
    path = os.path.join(BASE_DIR, 'test_xmls/reaction_rate_1.xml')
    rrr = ReactionSet(path)
    try:
        rrr.set_params(0, k=[-1, 2, 33])
    except TypeError as err:
        assert (type(err) == TypeError)
def test_set_param_error_coeftype():
    path = os.path.join(BASE_DIR, 'test_xmls/reaction_rate_1.xml')
    rrr = ReactionSet(path)
    try:
        rrr.set_params(1, coeftype='seyretttg')
    except ValueError as err:
        assert (type(err) == ValueError)
def test_set_params():
    path = os.path.join(BASE_DIR, 'test_xmls/reaction_coef_1.xml')
    rrr = ReactionSet(path)
    rrr.reaction_coefs(900)
    rrr.set_params(1, k=10, coeftype='Constant')
    assert (rrr.reaction_coefs(900)[1][0] == 10.0)