^^ my code is quite simple, and it is giving the a...
# ask-community
a
^^ my code is quite simple, and it is giving the above error on line - print(result)
Copy code
with raises(signals.SUCCESS) as excinfo:

	result = some_lib.some_function()
	print(result)

assert excinfo.type == signals.SUCCESS
assert excinfo.typename == 'SUCCESS'
c
Hi @Amit Singh - are you using
pytest.raises
? I’m not sure what the goal of this code is, but it appears to be testing that a random library function raises a particular Prefect signal
a
Hi @Chris White yes im using pytest.raises
I got your point though, have to raise a signal from the function being called here something like
raise signals.SUCCESS("Mail successfully sent.")
c
yup yup exactly
a
thanks a lot @Chris White
c
anytime!