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

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