Ejemplo n.º 1
0
def test_effectiveZ_errors():
    with pytest.raises(ValueError, match="list of tuples"):
        _ = effective_Z(1)

    with pytest.raises(ValueError, match="list of tuples"):
        _ = effective_Z([1, 2, 3])
Ejemplo n.º 2
0
def test_effectiveZ():
    np.testing.assert_allclose(effective_Z([(1, 1), (2, 2), (3, 3)]),
                               1.8984805)
    np.testing.assert_allclose(
        effective_Z([(1, 1), (2, 2), (3, 3)], exponent=1.5), 1.3616755)