Treat external predicate functions that return None as passing in expect()
Closed this issue · 0 comments
dgilland commented
Consider functions that return None
as having passed validation.
This is to mainly support assert
style predicate functions:
def validate(value):
assert value
# This currently throws an AssertionError.
expect(True, validate)
Currently, the only way these type of functions pass is if they return truthy:
def validate(value):
assert value
return True