Testing resources

test_mode(resources=...), MockResource, pytest fixtures, propagating errors.