Amit Singh02/19/2020, 7:37 PM
with raises(signals.SUCCESS) as excinfo: result = some_lib.some_function() print(result) assert excinfo.type == signals.SUCCESS assert excinfo.typename == 'SUCCESS'
? 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
Amit Singh02/19/2020, 7:47 PM
raise signals.SUCCESS("Mail successfully sent.")
Amit Singh02/19/2020, 7:48 PM