Example #1
0
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
Example #2
0
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
Example #3
0
def marker():
    return function_marker('some_marker')
Example #4
0
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
Example #5
0
def marker():
    return function_marker('some_marker')
Example #6
0
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