Ejemplo n.º 1
0
def test_check_solution(capsys):
    # wrong solution
    with pytest.raises(ValueError):
        utils.check_solution('hs', 1, 13, False, False)

    # wrong ab/msrc/mrec
    with pytest.raises(ValueError):
        utils.check_solution('dhs', None, 11, True, False)

    # wrong domain
    with pytest.raises(ValueError):
        utils.check_solution('fs', 1, 21, True, True)
Ejemplo n.º 2
0
def test_check_solution(capsys):
    # wrong solution
    with pytest.raises(ValueError, match='Solution must be one of'):
        utils.check_solution('hs', 1, 13, False, False)

    # wrong ab/msrc/mrec
    with pytest.raises(ValueError, match='Diffusive solution is only imple'):
        utils.check_solution('dhs', None, 11, True, False)

    # wrong domain
    with pytest.raises(ValueError, match='Full fullspace solution is only'):
        utils.check_solution('fs', 1, 21, True, True)