Skip to content

Commit b587fd6

Browse files
authored
Merge pull request python-ldap#6 – Add coverage reporting
python-ldap#6
2 parents 67c29dd + 8955a32 commit b587fd6

File tree

7 files changed

+71
-3
lines changed

7 files changed

+71
-3
lines changed

.coveragerc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[run]
2+
branch = True
3+
source =
4+
Lib/
5+
omit =
6+
Lib/slapdtest.py
7+
8+
[paths]
9+
source =
10+
Lib/
11+
.tox/*/lib/python*/site-packages/
12+
13+
[report]
14+
ignore_errors = False
15+
precision = 1
16+
exclude_lines =
17+
pragma: no cover
18+
raise NotImplementedError
19+
if 0:
20+
if __name__ == .__main__.:
21+
if PY2
22+
if not PY2
23+
24+
[html]
25+
directory = build/htmlcov
26+
title = python-ldap coverage report

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
*.pyc
55
__pycache__/
66
.tox
7+
.coverage*
8+
!.coveragerc
79

810
# shared libs installed by 'setup.py test'
911
/Lib/*.so*

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ addons:
2020

2121
install:
2222
- pip install "pip>=7.1.0"
23-
- pip install tox-travis tox
23+
- pip install tox-travis tox codecov coverage
2424

2525
script: tox
26+
27+
after_success:
28+
- python -m coverage combine
29+
- codecov

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.NOTPARALLEL:
2+
3+
.PHONY: all
4+
all:
5+
6+
.PHONY: clean
7+
clean:
8+
rm -rf build dist *.egg-info $(VENV) .tox
9+
rm -f .coverage .coverage.*
10+
find . -name '*.py[co]' -or -name '*.so*' -or -name '*.dylib' -delete
11+
find . -depth -name __pycache__ -exec rm -rf {} \;

Tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020
from . import t_ldapobject
2121
from . import t_edit
2222
from . import t_ldap_schema_subentry
23+
from . import t_untested_mods

Tests/t_untested_mods.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# modules without any tests
2+
import ldap.async
3+
import ldap.controls.deref
4+
import ldap.controls.openldap
5+
import ldap.controls.pagedresults
6+
import ldap.controls.ppolicy
7+
import ldap.controls.psearch
8+
import ldap.controls.pwdpolicy
9+
import ldap.controls.readentry
10+
import ldap.controls.sessiontrack
11+
import ldap.controls.sss
12+
import ldap.controls.vlv
13+
import ldap.logger
14+
import ldap.resiter
15+
import ldap.syncrepl

tox.ini

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55

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

1010
[testenv]
11-
commands = {envpython} setup.py test
1211
deps =
12+
coverage
1313
pyasn1
1414
pyasn1_modules
15+
commands = {envpython} -m coverage run --parallel setup.py test
16+
17+
[testenv:coverage-report]
18+
deps = coverage
19+
skip_install = true
20+
commands =
21+
{envpython} -m coverage combine
22+
{envpython} -m coverage report --show-missing
23+
{envpython} -m coverage html

0 commit comments

Comments
 (0)
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