Esempio n. 1
0
def test_text_merror():
    me = MError(
        0,
        "x",
        -1.0,
        1.0,
        True,
        True,
        True,
        False,
        False,
        False,
        False,
        False,
        False,
        42,
        0.123,
    )
    assert _repr_text.merrors({None: me}) == ref("merror")
Esempio n. 2
0
def test_Minuit():
    m = Minuit(sphere_np, (0, 0))
    with PrintAssert("<Minuit ...>") as pr:
        m._repr_pretty_(pr, True)

    with PrintAssert(tx.params(m.params)) as pr:
        m._repr_pretty_(pr, False)

    m.migrad()

    expected = (tx.fmin(m.fmin) + "\n" + tx.params(m.params) + "\n" +
                tx.matrix(m.covariance))
    with PrintAssert(expected) as pr:
        m._repr_pretty_(pr, False)

    m.minos()

    expected = (tx.fmin(m.fmin) + "\n" + tx.params(m.params) + "\n" +
                tx.merrors(m.merrors) + "\n" + tx.matrix(m.covariance))
    with PrintAssert(expected) as pr:
        m._repr_pretty_(pr, False)
Esempio n. 3
0
def test_MError():
    me = util.MError(
        1,
        "x",
        0.1,
        0.2,
        True,
        True,
        True,
        False,
        False,
        False,
        False,
        False,
        False,
        11,
        0.7,
    )

    with PrintAssert("<MError ...>") as pr:
        me._repr_pretty_(pr, True)

    with PrintAssert(tx.merrors({None: me})) as pr:
        me._repr_pretty_(pr, False)
Esempio n. 4
0
def test_MErrors():
    mes = util.MErrors(x=util.MError(
        1,
        "x",
        0.1,
        0.2,
        True,
        True,
        True,
        False,
        False,
        False,
        False,
        False,
        False,
        11,
        0.7,
    ))

    with PrintAssert("<MErrors ...>") as pr:
        mes._repr_pretty_(pr, True)

    with PrintAssert(tx.merrors(mes)) as pr:
        mes._repr_pretty_(pr, False)
Esempio n. 5
0
def test_text_merrors(minuit):
    assert _repr_text.merrors(minuit.merrors) == ref("merrors")