[tor-dev] Unit testing blog posts

Damian Johnson atagar1 at gmail.com
Thu Feb 16 21:09:44 UTC 2012


Nice posts and thanks for improving the tor tests! I'm not entirely in
agreement with the last point (about tests covering all cases). If the
test space is decently small then exercising everything can better
ensure that you don't violate a set of invariants. For example, one of
stem's unit tests attempt every combination of authentication methods
against every set of failures they can encounter, making sure that we
properly report success/failure and never raise an unexpected type of
exception...
https://gitweb.torproject.org/stem.git/blob/HEAD:/test/unit/connection/authentication.py#l69

But that said, in general you're probably right. -Damian


More information about the tor-dev mailing list