Compare commits

...

4 Commits

Author SHA1 Message Date
Brad Warren
57a1519584 Disable coverage on Python < 3.6 line. 2020-04-15 15:03:51 -07:00
Brad Warren
aedbfdc487 use py38 for code coverage 2020-04-15 14:54:33 -07:00
Brad Warren
ef9e892889 Merge branch 'master' into coverage++ 2020-04-15 14:52:44 -07:00
Brad Warren
960d66ff41 Consolidate cover envs and default to py3-cover 2020-04-14 11:34:40 -07:00
3 changed files with 12 additions and 23 deletions

View File

@@ -44,8 +44,8 @@ matrix:
<<: *not-on-master
# This job is always executed, including on master
- python: "2.7"
env: TOXENV=py27-cover FYI="py27 tests + code coverage"
- python: "3.8"
env: TOXENV=py38-cover FYI="py38 tests + code coverage"
- python: "3.7"
env: TOXENV=lint
@@ -60,12 +60,12 @@ matrix:
dist: trusty
env: TOXENV='py27-{acme,apache,apache-v2,certbot,dns,nginx}-oldest'
<<: *not-on-master
- python: "2.7"
env: TOXENV=py27
<<: *not-on-master
- python: "3.5"
env: TOXENV=py35
<<: *not-on-master
- python: "3.8"
env: TOXENV=py38
<<: *not-on-master
- sudo: required
env: TOXENV=apache_compat
services: docker

View File

@@ -741,7 +741,7 @@ class ApacheParser(object):
"""
if sys.version_info < (3, 6):
# This strips off final /Z(?ms)
return fnmatch.translate(clean_fn_match)[:-7]
return fnmatch.translate(clean_fn_match)[:-7] # pragma: no cover
# Since Python 3.6, it returns a different pattern like (?s:.*\.load)\Z
return fnmatch.translate(clean_fn_match)[4:-3] # pragma: no cover

23
tox.ini
View File

@@ -4,7 +4,7 @@
[tox]
skipsdist = true
envlist = modification,py3,py27-cover,lint,mypy
envlist = modification,py3-cover,lint,mypy
[base]
# pip installs the requested packages in editable mode
@@ -63,8 +63,11 @@ source_paths =
passenv =
CERTBOT_NO_PIN
commands =
{[base]install_and_test} {[base]all_packages}
python tests/lock_test.py
!cover: {[base]install_and_test} {[base]all_packages}
!cover: python tests/lock_test.py
cover: {[base]install_packages}
cover: {[base]pip_install} certbot-apache[dev]
cover: python tox.cover.py
# We always recreate the virtual environment to avoid problems like
# https://github.com/certbot/certbot/issues/7745.
recreate = true
@@ -116,20 +119,6 @@ commands =
setenv =
{[testenv:py27-oldest]setenv}
[testenv:py27-cover]
basepython = python2.7
commands =
{[base]install_packages}
{[base]pip_install} certbot-apache[dev]
python tox.cover.py
[testenv:py37-cover]
basepython = python3.7
commands =
{[base]install_packages}
{[base]pip_install} certbot-apache[dev]
python tox.cover.py
[testenv:lint]
basepython = python3
# separating into multiple invocations disables cross package