'Test with a raising function.'

def test_raising(self, caplog):

    with caplog.at_level(logging.ERROR, 'misc'):
        ret = self.func_raising()
    assert (ret == 42)
    assert (len(caplog.records) == 1)
    expected = 'Error    in    test_utils.TestPreventExceptions.func_raising'
    actual = caplog.records[0].message
    assert (actual == expected)
