def assert_not_observable(fn, *args, **kwargs):
    """
    Assert that a function call falls with a ValueError exception containing
    'missing label values'
    """

    try:
        fn(*args, **kwargs)
    except ValueError as e:
        assert 'missing label values' in str(e)
        return

    assert False, "Did not raise a 'missing label values' exception"
Assert that a function call falls with a ValueError exception containing
'missing label values'
tests/test_core.py