diff options
author | Maximilian Hils <git@maximilianhils.com> | 2013-08-17 13:30:36 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2013-08-17 13:30:36 +0200 |
commit | 729677cd85cffedec8f481f1b6025f00fb637e13 (patch) | |
tree | 39c245643c5a3a48bd14c6e13757148bda54e2f3 /doc-src/dev/testing.html | |
parent | 6fe175913e611097fdfdf0a6b20b1c05909374e1 (diff) | |
parent | a558c016d4430b67d221a369abe0cde1f4a40fce (diff) | |
download | mitmproxy-729677cd85cffedec8f481f1b6025f00fb637e13.tar.gz mitmproxy-729677cd85cffedec8f481f1b6025f00fb637e13.tar.bz2 mitmproxy-729677cd85cffedec8f481f1b6025f00fb637e13.zip |
Merge branch 'master' into 0.10
Diffstat (limited to 'doc-src/dev/testing.html')
-rw-r--r-- | doc-src/dev/testing.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/doc-src/dev/testing.html b/doc-src/dev/testing.html new file mode 100644 index 00000000..4cee29e8 --- /dev/null +++ b/doc-src/dev/testing.html @@ -0,0 +1,43 @@ + +All the mitmproxy projects strive to maintain 100% code coverage. In general, +patches and pull requests will be declined unless they're accompanied by a +suitable extension to the test suite. + +Our tests are written for the [nose](https://nose.readthedocs.org/en/latest/). +At the point where you send your pull request, a command like this: + +<pre class="terminal"> +> nosetests --with-cov --cov-report term-missing ./test +</pre> + +Should give output something like this: + +<pre class="terminal"> +> ---------- coverage: platform darwin, python 2.7.2-final-0 -- +> Name Stmts Miss Cover Missing +> ---------------------------------------------------- +> libmproxy/__init__ 0 0 100% +> libmproxy/app 4 0 100% +> libmproxy/cmdline 100 0 100% +> libmproxy/controller 69 0 100% +> libmproxy/dump 150 0 100% +> libmproxy/encoding 39 0 100% +> libmproxy/filt 201 0 100% +> libmproxy/flow 891 0 100% +> libmproxy/proxy 427 0 100% +> libmproxy/script 27 0 100% +> libmproxy/utils 133 0 100% +> libmproxy/version 4 0 100% +> ---------------------------------------------------- +> TOTAL 2045 0 100% +> ---------------------------------------------------- +> Ran 251 tests in 11.864s +</pre> + + +There are exceptions to the coverage requirement - for instance, much of the +console interface code can't sensibly be unit tested. These portions are +excluded from coverage analysis either in the **.coveragerc** file, or using +**#pragma no-cover** directives. To keep our coverage analysis relevant, we use +these measures as sparingly as possible. + |