Skip to content

[WIP] 2.0 #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 145 commits into from
Jul 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
7c6448d
Moved the coverage controllers out of pytest-cov to new package.
Jul 17, 2010
3839125
Changed to work with current released coverage.
Aug 2, 2010
1f9aba2
Subprocesses can't use source option yet. Better way to find site-pa…
Aug 2, 2010
ca7b46d
Added tag RELEASE_1_0 for changeset bc62935c7d6e
Aug 2, 2010
09e2bf6
Changes to cov option, reporting and imports.
Aug 8, 2010
a57321c
Added tag RELEASE_1_1 for changeset f0cd8f24d77e
Aug 8, 2010
97a2646
Change to use source option in coverage 3.4
Sep 23, 2010
415f824
Added tag RELEASE_1_2 for changeset a2ddd5473f1b
Sep 23, 2010
42b75c4
Update to detect session type and top dir for latest pytest.
Mar 27, 2011
6a52472
Path file only imports cov_core_init if needs to activate coverage.
Mar 27, 2011
182f9a9
Bump version for release.
Mar 27, 2011
6d28bac
Added tag RELEASE_1_3 for changeset 56fc572faa29
Mar 27, 2011
1e7a2f2
Fix a python3 division bug
liZe Feb 22, 2012
2eb5dbf
Bump version for release.
Mar 10, 2012
bce5789
Added tag RELEASE_1_4 for changeset e493e868963a
Mar 10, 2012
083a00c
Add hooks to start coverage for multiprocess forks.
Mar 11, 2012
7a84a6f
Added tag RELEASE_1_5 for changeset 69f3e3c7c4df
Mar 11, 2012
132eba7
Fix python 2.4 / 2.5
Mar 12, 2012
ed17cd4
Added tag RELEASE_1_6 for changeset a1ec97f79a80
Mar 12, 2012
7455103
handle failing to write to a path
Jul 10, 2012
fa6c3e6
Change pth file failure handling.
Sep 1, 2012
fe64e2d
Bump version for release.
Sep 1, 2012
6fa2bde
Added tag RELEASE_1_7 for changeset 11d168c649be
Sep 1, 2012
9c32554
Updated setup.py
schlamar Apr 18, 2014
e8d1025
Renamed README.
schlamar Apr 18, 2014
a052c08
English fixes in README
takluyver Apr 18, 2014
f7801ac
Merge pull request #1 from takluyver/patch-1
schlamar Apr 23, 2014
27c59a7
Added gitignore.
schlamar Apr 24, 2014
b77c10a
Fixed setup.py.
schlamar Apr 24, 2014
d50273c
Enabled coverage collection in DistMaster.
schlamar Apr 24, 2014
d6a120b
Updated MANIFEST.
schlamar Apr 24, 2014
493be4c
Bump version.
schlamar Apr 24, 2014
a9b9dbc
Stop coverage in DistMaster.
schlamar Apr 25, 2014
a4fc404
Use coverage's path rewrite.
schlamar Apr 25, 2014
dc522ee
Bump version.
schlamar Apr 25, 2014
dd81be5
Fixed possible KeyError when clearing environ in tests.
schlamar Apr 26, 2014
770871d
Bump version.
schlamar Apr 26, 2014
b980d6f
Fixed multiprocessing_hook on Windows.
schlamar Apr 28, 2014
ffb66a0
Bump version.
schlamar Apr 28, 2014
bdaed91
Fixed API-breaking change.
schlamar May 5, 2014
31c6f62
Bump version.
schlamar May 5, 2014
398dceb
Updated required coverage version.
schlamar Jun 5, 2014
82f3b53
Fixed race condition in multiprocessing hook.
schlamar Jun 5, 2014
d92699f
Added support for py.process.ForkedFunc
schlamar Jun 5, 2014
3029d92
Bump version.
schlamar Jun 12, 2014
034ded0
Revert "Added support for py.process.ForkedFunc"
schlamar Aug 22, 2014
3240305
Bump version.
schlamar Aug 22, 2014
188dda7
allow for cov_source=None
bukzor Oct 22, 2014
791b1f6
bump version
schlamar Nov 22, 2014
08b72c6
moved pytest-cov to subdirectory
schlamar Nov 22, 2014
434d7f7
moved cov-core to subdirectory
schlamar Nov 22, 2014
0a6b00d
Create CONTRIBUTING.md
schlamar Nov 24, 2014
2b0654d
Merge branch 'master' of cov-core into 2.0
schlamar Nov 22, 2014
1ba7ee6
add README
schlamar Nov 22, 2014
2a8f111
run tests also against cov-core master
schlamar Nov 22, 2014
8f1927e
cov-core: adjust maximum line length to 100
schlamar Nov 22, 2014
56b161c
general: run flake8 against all projects
schlamar Nov 22, 2014
29ceb5b
use data_suffix=True instead of manual calculation
schlamar Nov 22, 2014
e3e83c6
cov-core: do not hard code data file
schlamar Nov 22, 2014
44925d5
add example tox project
schlamar Nov 24, 2014
c46d9c5
cov-core: print no header if report is disabled
schlamar Nov 24, 2014
92d4549
travis: allow tests to fail with PyPI's cov-core
schlamar Nov 24, 2014
d289f76
travis: run important tests first
schlamar Nov 24, 2014
16ee9d6
test against cov-core master per default
schlamar Nov 24, 2014
5773cec
don't use private terminal reporter API
schlamar Nov 24, 2014
c6cb24f
added support for `cov-min` option to require coverage percentage
wolph Nov 24, 2014
8f679db
added support for `cov-min` option to require coverage percentage
wolph Nov 24, 2014
241b72b
update gitignore
schlamar Nov 24, 2014
af39229
fixed merge flake8 errors
wolph Nov 24, 2014
beef5f0
make --cov a flag per default
schlamar Nov 24, 2014
af3cb29
update example project with new cmd API
schlamar Nov 24, 2014
2603073
update tests with new cmd API
schlamar Nov 24, 2014
0afa8ab
add tests from @bukzor
schlamar Nov 24, 2014
313d5b9
test deprecation warning
schlamar Nov 24, 2014
394921b
merging...
wolph Nov 24, 2014
50a6672
added python 3 support
wolph Nov 24, 2014
c967ef2
added tests
wolph Nov 24, 2014
f978add
added test for no-report
wolph Nov 24, 2014
f24ec87
renamed tests for clarity
wolph Nov 24, 2014
f80178d
added tests for --cov-report=""
wolph Nov 25, 2014
dee6c36
Merge pull request #34 from WoLpH/2.0
schlamar Nov 25, 2014
a123ac1
improved internal handling of --cov_report
schlamar Nov 25, 2014
590649c
Merge branch 'master' into 2.0
schlamar Nov 25, 2014
82ee928
Delete CONTRIBUTING.md
schlamar Nov 25, 2014
6e542cc
Use the new build env on Travis
joshk Nov 25, 2014
47edd25
Merge pull request #36 from joshk/patch-1
schlamar Nov 25, 2014
c417680
Merge branch 'master' into 2.0
schlamar Nov 25, 2014
f609c06
add test for setting COVERAGE_FILE
schlamar Dec 10, 2014
ee119a0
Allow import to fail. This is not a good place to raise exceptions. (…
ionelmc Dec 23, 2014
241a367
Merge pull request #38 from ionelmc/patch-1
schlamar Dec 23, 2014
0525a07
ENH: Update README.rst
larsoner Jan 6, 2015
9316835
FIX: Update to cov-source
larsoner Jan 7, 2015
772f2e2
Merge pull request #40 from Eric89GXL/silent
schlamar Jan 8, 2015
de6f8e4
pin test dependencies to working versions
schlamar Mar 27, 2015
b586bfa
Merge pull request #50 from schlamar/fix-deps
schlamar Mar 27, 2015
5a06154
Remove MP Finalize if cov didnt initialize.
alisaifee Mar 27, 2015
a793976
Initial relayouting.
ionelmc Jun 5, 2015
906926d
Move this.
ionelmc Jun 5, 2015
ebc6a99
More relayouting
ionelmc Jun 5, 2015
ecdf3bf
Complete project structure.
ionelmc Jun 5, 2015
f1e0bd3
More corrections.
ionelmc Jun 5, 2015
c9731ab
Update setup.py to have the new pth handling and layout support.
ionelmc Jun 5, 2015
a6c5fa6
Remove --cov-source and fix --cov without arg to activate coverage (w…
ionelmc Jun 5, 2015
ca12e6b
Fix imports.
ionelmc Jun 5, 2015
0fdd8a3
Update readme about the --cov arg.
ionelmc Jun 5, 2015
a4a0d0a
Packaging fixes.
ionelmc Jun 5, 2015
d4681d5
Add missing deps.
ionelmc Jun 5, 2015
3dd5f86
Add pth files.
ionelmc Jun 5, 2015
9489bb5
Fix config.getvalue check.
ionelmc Jun 5, 2015
742baa7
Fix heading levels and correct names.
ionelmc Jun 5, 2015
a208b92
Fix test on python 2.6.
ionelmc Jun 5, 2015
d935aa5
Remove un-necessary tox envs.
ionelmc Jun 5, 2015
d73b543
Update changelog and authorship.
ionelmc Jun 5, 2015
004c99d
Fix manifest.
ionelmc Jun 5, 2015
12b2abc
Update target version
ionelmc Jun 5, 2015
824aa4f
Use os.pathsep instead of some arbitrary string. Make things easier t…
ionelmc Jun 5, 2015
4974160
Move the multiprocessing fixups in embed.py. Fixes circular import is…
ionelmc Jun 5, 2015
d8a12d9
Update CI conf.
ionelmc Jun 5, 2015
308f61f
Add missing deps.
ionelmc Jun 6, 2015
e807665
Test coverage 4.0 too. Loosen up a bit the tests (seems that in the r…
ionelmc Jun 6, 2015
e450a1c
Update changelog.
ionelmc Jun 6, 2015
1c62766
Add .env to ignores.
ionelmc Jun 18, 2015
e6b3088
Change a bit test_central_nonspecific and the test to actually trigge…
ionelmc Jun 18, 2015
e74f7d7
Reformat.
ionelmc Jun 20, 2015
7ee700f
Change a bit the test so the external code is non-stdlib.
ionelmc Jun 20, 2015
2f9c530
Use a helper module in a different location to test that inclue paths…
ionelmc Jun 20, 2015
8c4c5b8
Use new 4.0 release.
ionelmc Jun 21, 2015
098ed9b
Test that --cov-report=term will report missing lines if .coveragerc …
ionelmc Jun 28, 2015
9841727
If `term-missing` is not specified then use `None` instead of `False`…
ionelmc Jun 28, 2015
97e4b22
Load default cov_min from `[report]fail_under` (if coverage is 4.0). …
ionelmc Jun 28, 2015
10a54f1
Rename --cov-min to --cov-fail-under.
ionelmc Jun 28, 2015
90a6e35
Update changelog. Closes #1. Closes #2.
ionelmc Jun 28, 2015
cbebaa3
Update skel a bit.
ionelmc Jun 28, 2015
076045f
Fix incorrect renaming.
ionelmc Jun 28, 2015
781a9e9
Update changelog.
ionelmc Jun 29, 2015
c25b996
Unicodes
ionelmc Jun 29, 2015
2cfebe5
Fix version.
ionelmc Jun 29, 2015
3439cf4
Bump version: 1.0.0 → 2.0.0
ionelmc Jun 29, 2015
c1f29b5
Unfork project (rename back to pytest-cov).
ionelmc Jun 30, 2015
87d77b2
Remove release date (not released yet).
ionelmc Jul 4, 2015
a2cd060
Allow overriding interpreter from env (eg: for AppVeyor where there a…
ionelmc Jul 4, 2015
8c5859b
Remove some un-necessary cruft.
ionelmc Jul 5, 2015
5b91aff
Extend the changelog with some of the changes mentioned in #28.
ionelmc Jul 5, 2015
e03031d
Merge pull request #58 from ionelmc/single-package-and-other-fixes
schlamar Jul 6, 2015
d89f5c7
Rename test_pytest_cover.py to test_pytest_cov.py
schlamar Jul 6, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[paths]
source = src

[run]
branch = True
source = src
parallel = true

[report]
show_missing = true
precision = 2
omit = *migrations*
64 changes: 58 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,60 @@
*.pyo
*.pyc
*egg-info
build
*.py[cod]

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
env*
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
venv*/
pyvenv*/

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox
.coverage*
.coverage.*
nosetests.xml
htmlcov

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject
.idea
*.iml
*.komodoproject

# Complexity
output/*.html
output/*/index.html

# Sphinx
docs/_build

.DS_Store
*~
.*.sw[po]
.build
.ve
.env
.cache
.pytest
.bootstrap
*.bak
34 changes: 24 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
language: python
python: 2.7
sudo: false
env:
- TOX_ENV=flake8
- TOX_ENV=pypy
- TOX_ENV=pypy3
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py32
- TOX_ENV=py33
- TOX_ENV=py34
global:
LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
matrix:
- TOXENV=check
- TOXENV=2.6-37
- TOXENV=2.7-37
- TOXENV=3.3-37
- TOXENV=3.4-37
- TOXENV=pypy-37
- TOXENV=2.6-40
- TOXENV=2.7-40
- TOXENV=3.3-40
- TOXENV=3.4-40
- TOXENV=pypy-40
before_install:
- python --version
- virtualenv --version
- pip --version
- uname -a
- lsb_release -a
install:
- pip install tox
script:
- tox -e $TOX_ENV
- tox -v
notifications:
email:
on_success: never
on_failure: change
on_failure: always

13 changes: 13 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Authors
=======

* Marc Schlaich - http://www.schlamar.org/
* Rick van Hattem - http://wol.ph/
* Buck Evan - https://github.com/bukzor
* Eric Larson - http://larsoner.com/
* Marc Abramowitz - http://marc-abramowitz.com/
* Thomas Kluyver - https://github.com/takluyver
* Guillaume Ayoub - http://www.yabz.fr/
* Federico Ceratto - http://firelet.net/
* Josh Kalderimis - http://blog.cookiestack.com/
* Ionel Cristian Mărieș - http://blog.ionelmc.ro
22 changes: 22 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Changelog
=========

2.0.0 (??????????)
------------------

* Added ``--cov-fail-under``, akin to the new ``fail_under`` option in `coverage-4.0`
(automatically activated if there's a ``[report] fail_under = ...`` in ``.coveragerc``).
* Changed ``--cov-report=term`` to automatically upgrade to ``--cov-report=term-missing``
if there's ``[run] show_missing = True`` in ``.coveragerc``.
* Changed ``--cov`` so it can be used with no path argument (in wich case the source
settings from ``.coveragerc`` will be used instead).
* Fixed `.pth` installation to work in all cases (install, easy_install, wheels, develop etc).
* Fixed `.pth` uninstallation to work for wheel installs.
* Support for coverage 4.0.
* Data file suffixing changed to use coverage's ``data_suffix=True`` option (instead of the
custom suffixing).

1.8.2 (2014-11-06)
------------------

* N/A
89 changes: 89 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
============
Contributing
============

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.

Bug reports
===========

When `reporting a bug <https://github.com/schlamar/pytest-cov/issues>`_ please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

Documentation improvements
==========================

pytest-cov could always use more documentation, whether as part of the
official pytest-cov docs, in docstrings, or even on the web in blog posts,
articles, and such.

Feature requests and feedback
=============================

The best way to send feedback is to file an issue at https://github.com/schlamar/pytest-cov/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions are welcome :)

Development
===========

To set up `pytest-cov` for local development:

1. `Fork pytest-cov on GitHub <https://github.com/schlamar/pytest-cov/fork>`_.
2. Clone your fork locally::

git clone [email protected]:your_name_here/pytest-cov.git

3. Create a branch for local development::

git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

4. When you're done making changes, run all the checks, doc builder and spell checker with `tox <http://tox.readthedocs.org/en/latest/install.html>`_ one command::

tox

5. Commit your changes and push your branch to GitHub::

git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature

6. Submit a pull request through the GitHub website.

Pull Request Guidelines
-----------------------

If you need some code review or feedback while you're developing the code just make the pull request.

For merging, you should:

1. Include passing tests (run ``tox``) [1]_.
2. Update documentation when there's new API, functionality etc.
3. Add a note to ``CHANGELOG.rst`` about the changes.
4. Add yourself to ``AUTHORS.rst``.

.. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will
`run the tests <https://travis-ci.org/schlamar/pytest-cov/pull_requests>`_ for each change you add in the pull request.

It will be slower though ...

Tips
----

To run a subset of tests::

tox -e envname -- py.test -k test_myfeature

To run all the test environments in *parallel* (you need to ``pip install detox``)::

detox
File renamed without changes.
24 changes: 20 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
graft docs
graft example
graft src
graft ci
graft tests

include .bumpversion.cfg
include .coveragerc
include .cookiecutterrc
include .isort.cfg
include .pylintrc

include AUTHORS.rst
include CHANGELOG.rst
include CONTRIBUTING.rst
include LICENSE
include README.rst
include LICENSE.txt
include setup.py
include pytest_cov.py
include test_pytest_cov.py

include tox.ini .travis.yml appveyor.yml

global-exclude *.py[cod] __pycache__ *.so
Loading