@@ -193,43 +193,6 @@ This will lead to the report stating not only what lines were not covered, but
193
193
also what branch paths were not executed.
194
194
195
195
196
- Coverage results for modules imported early on
197
- ''''''''''''''''''''''''''''''''''''''''''''''
198
-
199
- For the *truly truly * daring, you can use a hack to get coverage.py to include
200
- coverage for modules that are imported early on during CPython's startup (e.g.
201
- the encodings module). Do not worry if you can't get this to work or it doesn't
202
- make any sense; it's entirely optional and only important for a small number of
203
- modules.
204
-
205
- If you still choose to try this, the first step is to make sure coverage.py's
206
- C extension is installed. You can check this with::
207
-
208
- ./python COVERAGEDIR --version
209
-
210
- If it says 'without C extension', then you will need to build the C extension.
211
- Assuming that coverage.py's clone is at ``COVERAGEDIR `` and your clone of CPython
212
- is at ``CPYTHONDIR ``, you can do this by executing the following in your coverage.py
213
- clone::
214
-
215
- CPPFLAGS="-I CPYTHONDIR -I CPYTHONDIR/Include" CPYTHONDIR/python setup.py build_ext --inplace
216
-
217
- This will build coverage.py's C extension code in-place, allowing the previous
218
- instructions on how to gather coverage to continue to work.
219
-
220
- To get coverage.py to be able to gather the most accurate coverage data on as
221
- many modules as possible
222
- **with a HORRIBLE HACK that you should NEVER use in your own code **, run the
223
- following from your CPython clone::
224
-
225
- PYTHONPATH=COVERAGEDIR/coverage/fullcoverage ./python COVERAGEDIR run --pylib Lib/test/regrtest.py
226
-
227
- This will give you the most complete coverage possible for CPython's standard
228
- library.
229
-
230
- .. _coverage.py : https://coverage.readthedocs.io/en/latest/
231
-
232
-
233
196
.. _coverage_by_regrtest :
234
197
235
198
Using test.regrtest
@@ -293,3 +256,4 @@ about 20 to 30 minutes on a modern computer.
293
256
.. _issue tracker : https://github.com/python/cpython/issues
294
257
.. _gcov : https://gcc.gnu.org/onlinedocs/gcc/Gcov.html
295
258
.. _lcov : https://ltp.sourceforge.net/coverage/lcov.php
259
+ .. _coverage.py : https://coverage.readthedocs.io/en/latest/
0 commit comments