diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..fc432b9e --- /dev/null +++ b/.coveragerc @@ -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 diff --git a/.gitignore b/.gitignore index 072e2034..03b366de 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ *.pyc __pycache__/ .tox +.coverage* +!.coveragerc # shared libs installed by 'setup.py test' /Lib/*.so* diff --git a/.travis.yml b/.travis.yml index 542377d8..48f09be8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..56aaa8c1 --- /dev/null +++ b/Makefile @@ -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 {} \; diff --git a/Tests/__init__.py b/Tests/__init__.py index 46b38618..9f54f87d 100644 --- a/Tests/__init__.py +++ b/Tests/__init__.py @@ -20,3 +20,4 @@ from . import t_ldapobject from . import t_edit from . import t_ldap_schema_subentry +from . import t_untested_mods diff --git a/Tests/t_untested_mods.py b/Tests/t_untested_mods.py new file mode 100644 index 00000000..6221f244 --- /dev/null +++ b/Tests/t_untested_mods.py @@ -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 diff --git a/tox.ini b/tox.ini index 61a6aed9..417c7aa9 100644 --- a/tox.ini +++ b/tox.ini @@ -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