Closed bandophahita closed 11 months ago
And in case it was not obvious (it wasn't to me) the reason the resolution got logged in this case was because of the way hamcrest deals with logged values. None
is wrapped in the IsEqual
object. When we do a is not None
check it passes because the object isn't None
. Those clever folks at hamcrest...
if retval is not None:
aside(f"=> {represent_prop(retval)}")
i think we can probably do something like:
if retval is not None or isinstance(func, Answerable):
...
or maybe keep a log of which protocols will be expected to return useful information from their -able method.
Unfortunately func
isn't an instance of the protocols, it's function
. We might have to get creative on how we identify which functions are allowed to return None.
I noticed that questions -- that uses a beat -- which could return
None
as a value do not get logged.Here is what gets logged:
Here is what I would expect to get logged: