Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_forward_references_must_be_registered_before_their_clients():
"""
If we haven't registered the 'Dependency' type yet, then we'll raise
a specific error so people can at least work out what the hell is happening
"""
container = punq.Container()
with pytest.raises(punq.InvalidForwardReferenceException):
container.register(Client)