METADATA 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. Metadata-Version: 2.1
  2. Name: pytest-cov
  3. Version: 2.6.0
  4. Summary: Pytest plugin for measuring coverage.
  5. Home-page: https://github.com/pytest-dev/pytest-cov
  6. Author: Marc Schlaich
  7. Author-email: marc.schlaich@gmail.com
  8. License: MIT
  9. Keywords: cover,coverage,pytest,py.test,distributed,parallel
  10. Platform: UNKNOWN
  11. Classifier: Development Status :: 5 - Production/Stable
  12. Classifier: Framework :: Pytest
  13. Classifier: Intended Audience :: Developers
  14. Classifier: License :: OSI Approved :: BSD License
  15. Classifier: Operating System :: Microsoft :: Windows
  16. Classifier: Operating System :: POSIX
  17. Classifier: Operating System :: Unix
  18. Classifier: Programming Language :: Python
  19. Classifier: Programming Language :: Python :: 2
  20. Classifier: Programming Language :: Python :: 2.7
  21. Classifier: Programming Language :: Python :: 3
  22. Classifier: Programming Language :: Python :: 3.4
  23. Classifier: Programming Language :: Python :: 3.5
  24. Classifier: Programming Language :: Python :: 3.6
  25. Classifier: Programming Language :: Python :: Implementation :: CPython
  26. Classifier: Programming Language :: Python :: Implementation :: PyPy
  27. Classifier: Topic :: Software Development :: Testing
  28. Classifier: Topic :: Utilities
  29. Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
  30. Requires-Dist: pytest (>=2.9)
  31. Requires-Dist: coverage (>=4.4)
  32. ========
  33. Overview
  34. ========
  35. .. start-badges
  36. .. list-table::
  37. :stub-columns: 1
  38. * - docs
  39. - |docs|
  40. * - tests
  41. - | |travis| |appveyor| |requires|
  42. * - package
  43. - | |version| |wheel| |supported-versions| |supported-implementations|
  44. | |commits-since|
  45. .. |docs| image:: https://readthedocs.org/projects/pytest-cov/badge/?style=flat
  46. :target: https://readthedocs.org/projects/pytest-cov
  47. :alt: Documentation Status
  48. .. |travis| image:: https://travis-ci.org/pytest-dev/pytest-cov.svg?branch=master
  49. :alt: Travis-CI Build Status
  50. :target: https://travis-ci.org/pytest-dev/pytest-cov
  51. .. |appveyor| image:: https://ci.appveyor.com/api/projects/status/github/pytest-dev/pytest-cov?branch=master&svg=true
  52. :alt: AppVeyor Build Status
  53. :target: https://ci.appveyor.com/project/pytestbot/pytest-cov
  54. .. |requires| image:: https://requires.io/github/pytest-dev/pytest-cov/requirements.svg?branch=master
  55. :alt: Requirements Status
  56. :target: https://requires.io/github/pytest-dev/pytest-cov/requirements/?branch=master
  57. .. |version| image:: https://img.shields.io/pypi/v/pytest-cov.svg
  58. :alt: PyPI Package latest release
  59. :target: https://pypi.python.org/pypi/pytest-cov
  60. .. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.6.0.svg
  61. :alt: Commits since latest release
  62. :target: https://github.com/pytest-dev/pytest-cov/compare/v2.6.0...master
  63. .. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg
  64. :alt: PyPI Wheel
  65. :target: https://pypi.python.org/pypi/pytest-cov
  66. .. |supported-versions| image:: https://img.shields.io/pypi/pyversions/pytest-cov.svg
  67. :alt: Supported versions
  68. :target: https://pypi.python.org/pypi/pytest-cov
  69. .. |supported-implementations| image:: https://img.shields.io/pypi/implementation/pytest-cov.svg
  70. :alt: Supported implementations
  71. :target: https://pypi.python.org/pypi/pytest-cov
  72. .. end-badges
  73. This plugin produces coverage reports. Compared to just using ``coverage run`` this plugin does some extras:
  74. * Subprocess support: you can fork or run stuff in a subprocess and will get covered without any fuss.
  75. * Xdist support: you can use all of pytest-xdist's features and still get coverage.
  76. * Consistent pytest behavior. If you run ``coverage run -m pytest`` you will have slightly different ``sys.path`` (CWD will be
  77. in it, unlike when running ``pytest``).
  78. All features offered by the coverage package should work, either through pytest-cov's command line options or
  79. through coverage's config file.
  80. * Free software: MIT license
  81. Installation
  82. ============
  83. Install with pip::
  84. pip install pytest-cov
  85. For distributed testing support install pytest-xdist::
  86. pip install pytest-xdist
  87. Upgrading from ancient pytest-cov
  88. ---------------------------------
  89. `pytest-cov 2.0` is using a new ``.pth`` file (``pytest-cov.pth``). You may want to manually remove the older
  90. ``init_cov_core.pth`` from site-packages as it's not automatically removed.
  91. Uninstalling
  92. ------------
  93. Uninstall with pip::
  94. pip uninstall pytest-cov
  95. Under certain scenarios a stray ``.pth`` file may be left around in site-packages.
  96. * `pytest-cov 2.0` may leave a ``pytest-cov.pth`` if you installed without wheels
  97. (``easy_install``, ``setup.py install`` etc).
  98. * `pytest-cov 1.8 or older` will leave a ``init_cov_core.pth``.
  99. Usage
  100. =====
  101. ::
  102. py.test --cov=myproj tests/
  103. Would produce a report like::
  104. -------------------- coverage: ... ---------------------
  105. Name Stmts Miss Cover
  106. ----------------------------------------
  107. myproj/__init__ 2 0 100%
  108. myproj/myproj 257 13 94%
  109. myproj/feature4286 94 7 92%
  110. ----------------------------------------
  111. TOTAL 353 20 94%
  112. Documentation
  113. =============
  114. http://pytest-cov.rtfd.org/
  115. Coverage Data File
  116. ==================
  117. The data file is erased at the beginning of testing to ensure clean data for each test run. If you
  118. need to combine the coverage of several test runs you can use the ``--cov-append`` option to append
  119. this coverage data to coverage data from previous test runs.
  120. The data file is left at the end of testing so that it is possible to use normal coverage tools to
  121. examine it.
  122. Limitations
  123. ===========
  124. For distributed testing the slaves must have the pytest-cov package installed. This is needed since
  125. the plugin must be registered through setuptools for pytest to start the plugin on the
  126. slave.
  127. For subprocess measurement environment variables must make it from the main process to the
  128. subprocess. The python used by the subprocess must have pytest-cov installed. The subprocess must
  129. do normal site initialisation so that the environment variables can be detected and coverage
  130. started.
  131. Acknowledgements
  132. ================
  133. Whilst this plugin has been built fresh from the ground up it has been influenced by the work done
  134. on pytest-coverage (Ross Lawley, James Mills, Holger Krekel) and nose-cover (Jason Pellerin) which are
  135. other coverage plugins.
  136. Ned Batchelder for coverage and its ability to combine the coverage results of parallel runs.
  137. Holger Krekel for pytest with its distributed testing support.
  138. Jason Pellerin for nose.
  139. Michael Foord for unittest2.
  140. No doubt others have contributed to these tools as well.
  141. Changelog
  142. =========
  143. 2.6.0 (2018-09-03)
  144. ------------------
  145. * Dropped support for Python < 3.4, Pytest < 3.5 and Coverage < 4.4.
  146. * Fixed some documentation formatting. Contributed by Jean Jordaan and Julian.
  147. * Added an example with ``addopts`` in documentation. Contributed by Samuel Giffard in
  148. `#195 <https://github.com/pytest-dev/pytest-cov/pull/195>`_.
  149. * Fixed ``TypeError: 'NoneType' object is not iterable`` in certain xdist configurations. Contributed by Jeremy Bowman in
  150. `#213 <https://github.com/pytest-dev/pytest-cov/pull/213>`_.
  151. * Added a ``no_cover`` marker and fixture. Fixes
  152. `#78 <https://github.com/pytest-dev/pytest-cov/issues/78>`_.
  153. * Fixed broken ``no_cover`` check when running doctests. Contributed by Terence Honles in
  154. `#200 <https://github.com/pytest-dev/pytest-cov/pull/200>`_.
  155. * Fixed various issues with path normalization in reports (when combining coverage data from parallel mode). Fixes
  156. `#130 <https://github.com/pytest-dev/pytest-cov/issues/161>`_.
  157. Contributed by Ryan Hiebert & Ionel Cristian Mărieș in
  158. `#178 <https://github.com/pytest-dev/pytest-cov/pull/178>`_.
  159. * Report generation failures don't raise exceptions anymore. A warning will be logged instead. Fixes
  160. `#161 <https://github.com/pytest-dev/pytest-cov/issues/161>`_.
  161. * Fixed multiprocessing issue on Windows (empty env vars are not passed). Fixes
  162. `#165 <https://github.com/pytest-dev/pytest-cov/issues/165>`_.
  163. 2.5.1 (2017-05-11)
  164. ------------------
  165. * Fixed xdist breakage (regression in ``2.5.0``).
  166. Fixes `#157 <https://github.com/pytest-dev/pytest-cov/issues/157>`_.
  167. * Allow setting custom ``data_file`` name in ``.coveragerc``.
  168. Fixes `#145 <https://github.com/pytest-dev/pytest-cov/issues/145>`_.
  169. Contributed by Jannis Leidel & Ionel Cristian Mărieș in
  170. `#156 <https://github.com/pytest-dev/pytest-cov/pull/156>`_.
  171. 2.5.0 (2017-05-09)
  172. ------------------
  173. * Always show a summary when ``--cov-fail-under`` is used. Contributed by Francis Niu in `PR#141
  174. <https://github.com/pytest-dev/pytest-cov/pull/141>`_.
  175. * Added ``--cov-branch`` option. Fixes `#85 <https://github.com/pytest-dev/pytest-cov/issues/85>`_.
  176. * Improve exception handling in subprocess setup. Fixes `#144 <https://github.com/pytest-dev/pytest-cov/issues/144>`_.
  177. * Fixed handling when ``--cov`` is used multiple times. Fixes `#151 <https://github.com/pytest-dev/pytest-cov/issues/151>`_.
  178. 2.4.0 (2016-10-10)
  179. ------------------
  180. * Added a "disarm" option: ``--no-cov``. It will disable coverage measurements. Contributed by Zoltan Kozma in
  181. `PR#135 <https://github.com/pytest-dev/pytest-cov/pull/135>`_.
  182. **WARNING: Do not put this in your configuration files, it's meant to be an one-off for situations where you want to
  183. disable coverage from command line.**
  184. * Fixed broken exception handling on ``.pth`` file. See `#136 <https://github.com/pytest-dev/pytest-cov/issues/136>`_.
  185. 2.3.1 (2016-08-07)
  186. ------------------
  187. * Fixed regression causing spurious errors when xdist was used. See `#124
  188. <https://github.com/pytest-dev/pytest-cov/issues/124>`_.
  189. * Fixed DeprecationWarning about incorrect `addoption` use. Contributed by Florian Bruhin in `PR#127
  190. <https://github.com/pytest-dev/pytest-cov/pull/127>`_.
  191. * Fixed deprecated use of funcarg fixture API. Contributed by Daniel Hahler in `PR#125
  192. <https://github.com/pytest-dev/pytest-cov/pull/125>`_.
  193. 2.3.0 (2016-07-05)
  194. ------------------
  195. * Add support for specifying output location for html, xml, and annotate report.
  196. Contributed by Patrick Lannigan in `PR#113 <https://github.com/pytest-dev/pytest-cov/pull/113>`_.
  197. * Fix bug hiding test failure when cov-fail-under failed.
  198. * For coverage >= 4.0, match the default behaviour of `coverage report` and
  199. error if coverage fails to find the source instead of just printing a warning.
  200. Contributed by David Szotten in `PR#116 <https://github.com/pytest-dev/pytest-cov/pull/116>`_.
  201. * Fixed bug occurred when bare ``--cov`` parameter was used with xdist.
  202. Contributed by Michael Elovskikh in `PR#120 <https://github.com/pytest-dev/pytest-cov/pull/120>`_.
  203. * Add support for ``skip_covered`` and added ``--cov-report=term-skip-covered`` command
  204. line options. Contributed by Saurabh Kumar in `PR#115 <https://github.com/pytest-dev/pytest-cov/pull/115>`_.
  205. 2.2.1 (2016-01-30)
  206. ------------------
  207. * Fixed incorrect merging of coverage data when xdist was used and coverage was ``>= 4.0``.
  208. 2.2.0 (2015-10-04)
  209. ------------------
  210. * Added support for changing working directory in tests. Previously changing working
  211. directory would disable coverage measurements in suprocesses.
  212. * Fixed broken handling for ``--cov-report=annotate``.
  213. 2.1.0 (2015-08-23)
  214. ------------------
  215. * Added support for `coverage 4.0b2`.
  216. * Added the ``--cov-append`` command line options. Contributed by Christian Ledermann
  217. in `PR#80 <https://github.com/pytest-dev/pytest-cov/pull/80>`_.
  218. 2.0.0 (2015-07-28)
  219. ------------------
  220. * Added ``--cov-fail-under``, akin to the new ``fail_under`` option in `coverage-4.0`
  221. (automatically activated if there's a ``[report] fail_under = ...`` in ``.coveragerc``).
  222. * Changed ``--cov-report=term`` to automatically upgrade to ``--cov-report=term-missing``
  223. if there's ``[run] show_missing = True`` in ``.coveragerc``.
  224. * Changed ``--cov`` so it can be used with no path argument (in wich case the source
  225. settings from ``.coveragerc`` will be used instead).
  226. * Fixed `.pth` installation to work in all cases (install, easy_install, wheels, develop etc).
  227. * Fixed `.pth` uninstallation to work for wheel installs.
  228. * Support for coverage 4.0.
  229. * Data file suffixing changed to use coverage's ``data_suffix=True`` option (instead of the
  230. custom suffixing).
  231. * Avoid warning about missing coverage data (just like ``coverage.control.process_startup``).
  232. * Fixed a race condition when running with xdist (all the workers tried to combine the files).
  233. It's possible that this issue is not present in `pytest-cov 1.8.X`.
  234. 1.8.2 (2014-11-06)
  235. ------------------
  236. * N/A