[TIP] What is a unit test (was: mocking a file in /proc)

Tim Ottinger tottinge at gmail.com
Tue May 9 19:14:23 PDT 2017


Actually, the type of test is important to TDD.

The kinds of tests that support TDD must be very fast and very small, and
very cheap to produce.
They need to confirm to FIRST attributes.

We find that when tests are not amazingly fast, they tend to be skipped or
the developer builds up a lot more code betwen test runs (which robs the
whole Red/Green/Refactor/Integrate process of the fast feedback that is
crucial to its success).

We refer to TDD style tests as "microtests" to separate them from the kind
of unit, component, subsystem, and integration tests that can be built
using the same framework, but which developers are loathe to run
continuously.

But essentially, if you use sniffer (or the like, such as autotest turned
on if you use PyCharm) and you have continuous testing while developing,
and you follow the four-step TDD process -- or the older 3-step version --
then it's still TDD.

F.I.R.S.T qualities make the TDD tests affordable, which makes the TDD
process affordable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20170510/98aaf469/attachment.htm>


More information about the testing-in-python mailing list