def METHOD_NAME(patchset):
    # Using asserts with str(exc_info.value) over pytest.raises(..., match="...")
    # to make it easier to check multiple strings.
    with pytest.raises(pyhf.exceptions.InvalidPatchLookup) as exc_info:
        patchset.__getitem__('nonexisting_patch')
    assert 'No patch associated with' in str(exc_info.value)
    assert 'nonexisting_patch' in str(exc_info.value)