OLD | NEW |
1 .. _contributing: | 1 .. _contributing: |
2 | 2 |
3 =========================== | 3 =========================== |
4 Contributing to coverage.py | 4 Contributing to coverage.py |
5 =========================== | 5 =========================== |
6 | 6 |
7 :history: 20121112T154100, brand new docs. | 7 :history: 20121112T154100, brand new docs. |
8 | 8 |
9 .. highlight:: console | 9 .. highlight:: console |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 py26 runtests: commands[6] | 97 py26 runtests: commands[6] |
98 === CPython 2.6.6 with C tracer (/home/ned/coverage/tox/py26/bin/python) === | 98 === CPython 2.6.6 with C tracer (/home/ned/coverage/tox/py26/bin/python) === |
99 ............................................................................
...............(etc) | 99 ............................................................................
...............(etc) |
100 ---------------------------------------------------------------------- | 100 ---------------------------------------------------------------------- |
101 Ran 364 tests in 11.458s | 101 Ran 364 tests in 11.458s |
102 | 102 |
103 OK | 103 OK |
104 (and so on...) | 104 (and so on...) |
105 | 105 |
106 Tox runs the complete test suite twice for each version of Python you have | 106 Tox runs the complete test suite twice for each version of Python you have |
107 installed. The first run uses the Python implementation of the trace | 107 installed. The first run uses the Python implementation of the trace function, |
108 function, the second uses the C implementation. | 108 the second uses the C implementation. |
109 | 109 |
110 To limit tox to just a few versions of Python, use the ``-e`` switch:: | 110 To limit tox to just a few versions of Python, use the ``-e`` switch:: |
111 | 111 |
112 $ tox -e py27,py33 | 112 $ tox -e py27,py33 |
113 | 113 |
114 To run just a few tests, you can use nose test selector syntax:: | 114 To run just a few tests, you can use nose test selector syntax:: |
115 | 115 |
116 $ tox test.test_misc:SetupPyTest.test_metadata | 116 $ tox tests.test_misc:SetupPyTest.test_metadata |
117 | 117 |
118 This looks in `test/test_misc.py` to find the `SetupPyTest` class, and runs the | 118 This looks in `tests/test_misc.py` to find the `SetupPyTest` class, and runs |
119 `test_metadata` test method. | 119 the `test_metadata` test method. |
120 | 120 |
121 Of course, run all the tests on every version of Python you have, before | 121 Of course, run all the tests on every version of Python you have, before |
122 submitting a change. | 122 submitting a change. |
123 | 123 |
124 | 124 |
125 Lint, etc | 125 Lint, etc |
126 --------- | 126 --------- |
127 | 127 |
128 I try to keep the coverage.py as clean as possible. I use pylint to alert me | 128 I try to keep the coverage.py as clean as possible. I use pylint to alert me |
129 to possible problems:: | 129 to possible problems:: |
130 | 130 |
131 $ make lint | 131 $ make lint |
132 pylint --rcfile=.pylintrc coverage setup.py test | 132 pylint --rcfile=.pylintrc coverage setup.py tests |
133 python -m tabnanny coverage setup.py test | 133 python -m tabnanny coverage setup.py tests |
134 python igor.py check_eol | 134 python igor.py check_eol |
135 | 135 |
136 The source is pylint-clean, even if it's because there are pragmas quieting | 136 The source is pylint-clean, even if it's because there are pragmas quieting |
137 some warnings. Please try to keep it that way, but don't let pylint warnings | 137 some warnings. Please try to keep it that way, but don't let pylint warnings |
138 keep you from sending patches. I can clean them up. | 138 keep you from sending patches. I can clean them up. |
139 | 139 |
140 | 140 |
141 Coverage testing coverage.py | 141 Coverage testing coverage.py |
142 ---------------------------- | 142 ---------------------------- |
143 | 143 |
(...skipping 11 matching lines...) Expand all Loading... |
155 Contributing | 155 Contributing |
156 ------------ | 156 ------------ |
157 | 157 |
158 When you are ready to contribute a change, any way you can get it to me is | 158 When you are ready to contribute a change, any way you can get it to me is |
159 probably fine. A pull request on Bitbucket is great, but a simple diff or | 159 probably fine. A pull request on Bitbucket is great, but a simple diff or |
160 patch is great too. | 160 patch is great too. |
161 | 161 |
162 | 162 |
163 .. _Mercurial: http://mercurial.selenic.com/ | 163 .. _Mercurial: http://mercurial.selenic.com/ |
164 .. _tox: http://tox.testrun.org/ | 164 .. _tox: http://tox.testrun.org/ |
OLD | NEW |