[TIP] Boolean testing frameworks?

Robert Gomułka robert.zbigniew.gomulka at gmail.com
Tue Mar 14 05:11:46 PDT 2017


Thank you,
this hamcrest thing seems to match my vague memories best.

I'll read more about it, then.

Regards,
Robert

On Tue, Mar 14, 2017 at 12:12 PM, James Cooke <me at jamescooke.info> wrote:
> Hi Robert,
>
> Do you mean something like Hamcrest? http://hamcrest.org/
>
> Python version is here: https://github.com/hamcrest/PyHamcrest
>
> Cheers,
>
> James
>
>
>
> On Tue, 14 Mar 2017, at 07:51 AM, Robert Gomułka wrote:
>> Hi all,
>> 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.
>>
>> Regards,
>> Robert
>>
>> _______________________________________________
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
>> http://lists.idyll.org/listinfo/testing-in-python
>
>
> --
> James Cooke
> Backend software developer
> CV PDF: http://jamescooke.info/docs/james_cooke_cv.pdf
> Website: http://jamescooke.info/
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python



More information about the testing-in-python mailing list