Beispiel #1
0
def test_ErrorLens_repr_with_seperate_message():
    lens = b.ErrorIso('test', 'a message')
    assert repr(lens) == "ErrorIso('test', 'a message')"
Beispiel #2
0
def test_ErrorLens_view():
    class CustomException(Exception):
        pass

    with pytest.raises(CustomException):
        b.ErrorIso(CustomException('a message')).view(object())
Beispiel #3
0
def test_ErrorLens_set():
    with pytest.raises(CustomException):
        b.ErrorIso(CustomException('a message')).set(object(), object())
Beispiel #4
0
def test_ErrorLens_view():
    with pytest.raises(CustomException):
        b.ErrorIso(CustomException("a message")).view(object())