
Feb. 28, 2015
8:15 p.m.
Hi, On 2015-02-25 08:03, Ionel Cristian Mrie wrote:
Yes, it does, however my assertion looks similar to this:
assert result == [1,2, (3, 4, {"bubu": OSError('foobar')})]
How about reifying the error? I.e., instead of storing the OSError object, you wrap up the error info ('foobar') in a custom Result (e.g.) object that you implement your own comparison for? Then, instead of allowing your function to raise and exception, you catch the exception and wrap its data in a Result object? Regards, Yawar