[TIP] Boolean testing frameworks?
robert.zbigniew.gomulka at gmail.com
Tue Mar 14 00:51:03 PDT 2017
some time ago (years?) I saw a testing framework allowing combining
test oracles with boolean expressions.
It was more or less like:
>>> self.and(self.eq(a, 1), self.eq(b, 2))
>>> self.or(self.eq(a, 3), self.ne(b, 3))
>>> self.or(self.and(..., ...), self.eq(...))
Does anybody remember such a thing? I think it was Python, but can't
be sure and it could be any other language.
And it wasn't unittest, which would allow to achieve that, but with
unfriendly syntax and summary:
>>> self.is_(True, lambda: condition() and condition2())
AssertionError: condition() and condition2() is False
I don't want to discuss the approach of such constructs, I just wanted
to read more about it, but my googling didn't reveal anything. (Nor
stackoverflow question, which was downvoted as not constructive)
I'd appreciate any feedback.
More information about the testing-in-python