4 ms·
From the description, doctest seems more like a kind of unit test: it makes sure that the test cases embedded in the doc string return the correct values when r
by greenyoda 11y ago
From the description, doctest seems more like a kind of unit test: it makes sure that the test cases embedded in the doc string return the correct values when run. But you can't prove that the a function works correctly just by running a few test cases (or even a lot of test cases) - doctest has no representation of the function, so it can't reason about how the function is supposed to work (let alone the system as a whole). For example, it can't tell if the arguments passed to this function by another function will always conform to what this function expects to receive.
- gravypod 11y agoNo, you never can. In any language, no matter the kind of specification, I can write an elaborate method to break any form of non-human verification. Maybe I'm not getting it. It just sounds like a unit test design with extra steps. I might just need to see an example to understand how it works. Too bad this is closed source.
- greenyoda 11y agoThe TLA+ tool that they're using is actually open source. You can read about it here (and there's a link to the source on CodePlex): http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html http://research.microsoft.com/en-us/um/people/lamport/tla/tl...