def test_register(self): category, key, value = "backbone_class", "test_key", 0 registry = Registry() registry.register(category, key, value) assert registry._dict[(category, key)] == value
def test_get(self): category, key, value = "backbone_class", "test_key", 0 registry = Registry() registry.register(category, key, value) assert registry.get(category, key) == value
def test_register_err(self, category, key, err_msg): registry = Registry() with pytest.raises(ValueError) as err_info: registry.register(category, key, 0) assert err_msg in str(err_info.value)