def test__pop_legend_kwarg_error(keys): kws = dict(zip(keys, range(len(keys)))) with pytest.raises(ValueError): bph._pop_legend_kwarg(kws)
def test__pop_legend_kwarg(key): kws = {'foo': 10, key: 'bar'} assert bph._pop_legend_kwarg(kws) == {key: "bar"}