Code review comment for lp:~jkakar/launchpadlib/testing-support

Revision history for this message
Jamu Kakar (jkakar) wrote :

There's another important point that I think is obvious, but I'll
mention it anyway: it's important for tests to be fast. The tests
I've written for FakeLaunchpad itself demonstrate that this method
can result in fast tests. The 40 or so tests I've added run in 0.1s
locally, though they achieve this speed by caching the wadllib
Application object and reusing it for each test. Even still,
reloading the WADL file isn't too terrible.

launchpadlib is quite slow because of all the round trips. Writing
a test suite for a non-trivial application that needs a real
Launchpad API server will eventually result in a slow test suite
that will be annoying to work with.

Another important point is that using a real Launchpad API server
for unit tests will cause difficulty when it comes to simulating
failures. Doing so with FakeLaunchpad will be much easier.

« Back to merge proposal