def test_decorator(): r = Registry("") @r.add def bar(): pass r.get("bar")
def test_add_module(): r = Registry("") r.add_from_module(module) r.get("foo") with pytest.raises(RegistryException): r.get_instance("bar")
def test_kwargs(): r = Registry("") r.add(bar=foo) r.get("bar")