Skip to content

Add coverage reporting #6

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 1 commit into from
Nov 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 26 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[run]
branch = True
source =
Lib/
omit =
Lib/slapdtest.py

[paths]
source =
Lib/
.tox/*/lib/python*/site-packages/

[report]
ignore_errors = False
precision = 1
exclude_lines =
pragma: no cover
raise NotImplementedError
if 0:
if __name__ == .__main__.:
if PY2
if not PY2

[html]
directory = build/htmlcov
title = python-ldap coverage report
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*.pyc
__pycache__/
.tox
.coverage*
!.coveragerc

# shared libs installed by 'setup.py test'
/Lib/*.so*
Expand Down
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ addons:

install:
- pip install "pip>=7.1.0"
- pip install tox-travis tox
- pip install tox-travis tox codecov coverage

script: tox

after_success:
- python -m coverage combine
- codecov
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.NOTPARALLEL:

.PHONY: all
all:

.PHONY: clean
clean:
rm -rf build dist *.egg-info $(VENV) .tox
rm -f .coverage .coverage.*
find . -name '*.py[co]' -or -name '*.so*' -or -name '*.dylib' -delete
find . -depth -name __pycache__ -exec rm -rf {} \;
1 change: 1 addition & 0 deletions Tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
from . import t_ldapobject
from . import t_edit
from . import t_ldap_schema_subentry
from . import t_untested_mods
15 changes: 15 additions & 0 deletions Tests/t_untested_mods.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# modules without any tests
import ldap.async
import ldap.controls.deref
import ldap.controls.openldap
import ldap.controls.pagedresults
import ldap.controls.ppolicy
import ldap.controls.psearch
import ldap.controls.pwdpolicy
import ldap.controls.readentry
import ldap.controls.sessiontrack
import ldap.controls.sss
import ldap.controls.vlv
import ldap.logger
import ldap.resiter
import ldap.syncrepl
13 changes: 11 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@

[tox]
# Note: when updating Python versions, also change setup.py and .travis.yml
envlist = py27,py33,py34,py35,py36
envlist = py27,py33,py34,py35,py36,coverage-report

[testenv]
commands = {envpython} setup.py test
deps =
coverage
pyasn1
pyasn1_modules
commands = {envpython} -m coverage run --parallel setup.py test

[testenv:coverage-report]
deps = coverage
skip_install = true
commands =
{envpython} -m coverage combine
{envpython} -m coverage report --show-missing
{envpython} -m coverage html
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy