def test_marker_value(func, value): marker = function_marker('bla') func = marker(value)(func) assert marker.is_marked(func) assert marker.get_value(func) == value
def marker(): return function_marker('some_marker')
def test_marker_value_does_not_exist(func): with pytest.raises(LookupError): function_marker('bla').get_value(func) assert function_marker('bla').get_value(func, 1) == 1