…at least, you can if you write python (though I’ve already received some interest in porting this to other languages from people).
I’ve spent today hacking on a pure python testmachine library. It works rather nicely: It’s significantly less magical than hypothesis, gives you a lot more power and produces very clean output.
Here’s some example output, which finds an unbalanced tree:
t1 = Leaf() t2 = Leaf() t3 = Leaf() t4 = t3.join(t2) t5 = t4.join(t4) t6 = t5.join(t1) assert t6.balanced()
I’ve uploaded an initial version to pypi, but this should definitely be considered a “for you to have a play with” version rather than something that you should get annoyed with me if I break the API. I’m very much still experimenting with how this works, but initial impression is that the answer is “rather well”, and I’m not too unhappy with the core API.