diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-16 02:53:01 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-16 02:53:01 +0200 |
commit | 457025df9a64f312685774cb743eeb52cd37bd3f (patch) | |
tree | 98de6633322059ac95ab50e4b2d3129aa6051b58 /docs/dev/testing.rst | |
parent | 436a9ea8398e25709f139fde609aa74e8fb3f3f8 (diff) | |
parent | c3f73552b82923e8da224529895332c44bf8dace (diff) | |
download | mitmproxy-457025df9a64f312685774cb743eeb52cd37bd3f.tar.gz mitmproxy-457025df9a64f312685774cb743eeb52cd37bd3f.tar.bz2 mitmproxy-457025df9a64f312685774cb743eeb52cd37bd3f.zip |
Merge pull request #751 from mitmproxy/readthedocs
Move Docs to readthedocs
Diffstat (limited to 'docs/dev/testing.rst')
-rw-r--r-- | docs/dev/testing.rst | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/dev/testing.rst b/docs/dev/testing.rst new file mode 100644 index 00000000..36c85426 --- /dev/null +++ b/docs/dev/testing.rst @@ -0,0 +1,46 @@ +.. _testing: + +Testing +======= + +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_ test framework. +At the point where you send your pull request, a command like this: + +>>> nosetests --with-cov --cov-report term-missing ./test + +Should give output something like this: + +.. code-block:: none + + > ---------- 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 + + +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. + +.. _nose: https://nose.readthedocs.org/en/latest/ |