diff options
Diffstat (limited to 'doc/contributing.rst')
-rw-r--r-- | doc/contributing.rst | 90 |
1 files changed, 46 insertions, 44 deletions
diff --git a/doc/contributing.rst b/doc/contributing.rst index 472f7ce..f6155ca 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -67,51 +67,49 @@ The tests are written as standard unittest-style tests, and are run with `tox`_:: $ tox - py27 create: /Users/ned/coverage/trunk/.tox/py27 - py27 installdeps: nose==1.3.7, mock==1.3.0, PyContracts==1.7.6, gevent==1.0.2, eventlet==0.17.4, greenlet==0.4.7 - py27 develop-inst: /Users/ned/coverage/trunk - py27 installed: -f /Users/ned/Downloads/local_pypi,-e hg+ssh://hg@bitbucket.org/ned/coveragepy@22fe9a2b7796f6498aa013c860c268ac21651226#egg=coverage-dev,decorator==4.0.2,eventlet==0.17.4,funcsigs==0.4,gevent==1.0.2,greenlet==0.4.7,mock==1.3.0,nose==1.3.7,pbr==1.6.0,PyContracts==1.7.6,pyparsing==2.0.3,six==1.9.0,wheel==0.24.0 - py27 runtests: PYTHONHASHSEED='1294330776' + py27 develop-inst-noop: /Users/ned/coverage/trunk + py27 installed: apipkg==1.4,-e hg+ssh://hg@bitbucket.org/ned/coveragepy@6664140e34beddd6fee99b729bb9f4545a429c12#egg=coverage,covtestegg1==0.0.0,decorator==4.0.10,eventlet==0.19.0,execnet==1.4.1,funcsigs==1.0.2,gevent==1.1.2,greenlet==0.4.10,mock==2.0.0,pbr==1.10.0,py==1.4.31,PyContracts==1.7.12,pyparsing==2.1.10,pytest==3.0.5.dev0,pytest-warnings==0.2.0,pytest-xdist==1.15.0,six==1.10.0,unittest-mixins==1.1.1 + py27 runtests: PYTHONHASHSEED='4113423111' py27 runtests: commands[0] | python setup.py --quiet clean develop + no previously-included directories found matching 'tests/eggsrc/dist' + no previously-included directories found matching 'tests/eggsrc/*.egg-info' py27 runtests: commands[1] | python igor.py zip_mods install_egg remove_extension py27 runtests: commands[2] | python igor.py test_with_tracer py - === CPython 2.7.10 with Python tracer (.tox/py27/bin/python) === - ............................................................................(etc) - ---------------------------------------------------------------------- - Ran 592 tests in 65.524s - - OK (SKIP=20) + === CPython 2.7.12 with Python tracer (.tox/py27/bin/python) === + gw0 [679] / gw1 [679] / gw2 [679] + scheduling tests via LoadScheduling + ...........ss...................................................................................ss...s.......s...........................s...............................................................................s.....................................................................................................................................................s.........................................................................................s.s.s.s.s.ssssssssssss.ss..................................................s...................................................................s.............................................................................. + 649 passed, 30 skipped in 42.89 seconds py27 runtests: commands[3] | python setup.py --quiet build_ext --inplace py27 runtests: commands[4] | python igor.py test_with_tracer c - === CPython 2.7.10 with C tracer (.tox/py27/bin/python) === - ............................................................................(etc) - ---------------------------------------------------------------------- - Ran 592 tests in 69.635s - - OK (SKIP=4) - py33 create: /Users/ned/coverage/trunk/.tox/py33 - py33 installdeps: nose==1.3.7, mock==1.3.0, PyContracts==1.7.6, greenlet==0.4.7 - py33 develop-inst: /Users/ned/coverage/trunk - py33 installed: -f /Users/ned/Downloads/local_pypi,-e hg+ssh://hg@bitbucket.org/ned/coveragepy@22fe9a2b7796f6498aa013c860c268ac21651226#egg=coverage-dev,decorator==4.0.2,greenlet==0.4.7,mock==1.3.0,nose==1.3.7,pbr==1.6.0,PyContracts==1.7.6,pyparsing==2.0.3,six==1.9.0,wheel==0.24.0 - py33 runtests: PYTHONHASHSEED='1294330776' - py33 runtests: commands[0] | python setup.py --quiet clean develop - py33 runtests: commands[1] | python igor.py zip_mods install_egg remove_extension - py33 runtests: commands[2] | python igor.py test_with_tracer py - === CPython 3.3.6 with Python tracer (.tox/py33/bin/python) === - ............................................S...............................(etc) - ---------------------------------------------------------------------- - Ran 592 tests in 73.007s - - OK (SKIP=22) - py33 runtests: commands[3] | python setup.py --quiet build_ext --inplace - py33 runtests: commands[4] | python igor.py test_with_tracer c - === CPython 3.3.6 with C tracer (.tox/py33/bin/python) === - ............................................S...............................(etc) - ---------------------------------------------------------------------- - Ran 592 tests in 72.071s - - OK (SKIP=5) - (and so on...) + === CPython 2.7.12 with C tracer (.tox/py27/bin/python) === + gw0 [679] / gw1 [679] / gw2 [679] + scheduling tests via LoadScheduling + ............ss................................................................................s..s.....s......s.........................s..........................................................................................s............................................................................................................s............................................................................................................................s...................................................................s........................................................................s............................................................................ + 667 passed, 12 skipped in 41.87 seconds + py35 develop-inst-noop: /Users/ned/coverage/trunk + py35 installed: apipkg==1.4,-e hg+ssh://hg@bitbucket.org/ned/coveragepy@6664140e34beddd6fee99b729bb9f4545a429c12#egg=coverage,covtestegg1==0.0.0,decorator==4.0.10,eventlet==0.19.0,execnet==1.4.1,gevent==1.1.2,greenlet==0.4.10,mock==2.0.0,pbr==1.10.0,py==1.4.31,PyContracts==1.7.12,pyparsing==2.1.10,pytest==3.0.5.dev0,pytest-warnings==0.2.0,pytest-xdist==1.15.0,six==1.10.0,unittest-mixins==1.1.1 + py35 runtests: PYTHONHASHSEED='4113423111' + py35 runtests: commands[0] | python setup.py --quiet clean develop + no previously-included directories found matching 'tests/eggsrc/dist' + no previously-included directories found matching 'tests/eggsrc/*.egg-info' + py35 runtests: commands[1] | python igor.py zip_mods install_egg remove_extension + py35 runtests: commands[2] | python igor.py test_with_tracer py + === CPython 3.5.2 with Python tracer (.tox/py35/bin/python) === + gw0 [679] / gw1 [679] / gw2 [679] + scheduling tests via LoadScheduling + ............s..........................................................................................................................................................s..s...........................................................................................................................................................................................s.................................................................................................sssssssssssssssssss............................................................s................................................................s.............................................................................. + 654 passed, 25 skipped in 47.25 seconds + py35 runtests: commands[3] | python setup.py --quiet build_ext --inplace + py35 runtests: commands[4] | python igor.py test_with_tracer c + === CPython 3.5.2 with C tracer (.tox/py35/bin/python) === + gw0 [679] / gw1 [679] / gw2 [679] + scheduling tests via LoadScheduling + ...........s...............................................................................................................................................................................................s......s..........................................................................................................................................................s.................................................................................................s....................................................................................................................................s.................................................................................. + 673 passed, 6 skipped in 53.20 seconds + _________________________________________________________________________________________ summary __________________________________________________________________________________________ + py27: commands succeeded + py35: commands succeeded Tox runs the complete test suite twice for each version of Python you have installed. The first run uses the Python implementation of the trace function, @@ -121,16 +119,20 @@ To limit tox to just a few versions of Python, use the ``-e`` switch:: $ tox -e py27,py33 -To run just a few tests, you can use nose test selector syntax:: +To run just a few tests, you can use `pytest test selectors`_:: - $ tox tests.test_misc:SetupPyTest.test_metadata + $ tox tests/test_misc.py + $ tox tests/test_misc.py::SetupPyTest + $ tox tests/test_misc.py::SetupPyTest::test_metadata -This looks in `tests/test_misc.py` to find the `SetupPyTest` class, and runs -the `test_metadata` test method. +These command run the tests in one file, one class, and just one test, +respectively. Of course, run all the tests on every version of Python you have, before submitting a change. +.. _pytest test selectors: http://doc.pytest.org/en/latest/usage.html#specifying-tests-selecting-tests + Lint, etc --------- |