← Back to team overview

duplicity-team team mailing list archive

Code Coverage

 

Heyo!  It's no secret that our tests don't cover as much code paths as they
should.

Here are some things that I personally would love to see (not requesting
anyone work on them or saying I will do them myself in short term -- just
starting a discussion of what we'd like to see).

* Have the test framework report on test code coverage percentage (and
maybe add a test to make sure we don't drop our percentage as new features
get added)
* Mock services for each backend (so we can actually test backend code too)
-- and make having one a requirement for accepting new backends
* Fewer differences between normal execution and test runs (we do stuff
like --no-print-statistics in some tests which disables code paths)
* Reducing lines of code in general, which could involve consolidating
duplicate code in backends (retry code comes to mind) or tests (code that
launches duplicity could be shared) or bumping python requirements (can
drop our tarfile and urlparse copies and more)
* Adding tests to exercise portions of code not yet covered

Anyway.  Just thinking about this the other day.  It would make it easier
to be confident about making changes to the code base.

I'm particularly interested in thinking about ways to mock the remote
services needed by the backends.

-mt

Follow ups