Пример #1
0
def test_mulstd_read_failure():
    onet = Var([50, 60], [2000, 2010])
    with pytest.raises(ValueError):
        onet.get_mulstd("else")

    # Here the key is good, but there is nothing there.
    assert isnan(onet.get_mulstd('dage'))
Пример #2
0
def test_mulstd(name, value):
    onet = Var([50, 60], [2000, 2010])
    onet.set_mulstd(name, value)
    assert onet.get_mulstd(name) == value

    onet.set_mulstd("dage", 2.4)
    onet.set_mulstd("dtime", -7.3)
    assert onet.get_mulstd("dage") == 2.4
    assert onet.get_mulstd("dtime") == -7.3