Skip to content

Next release #344

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 3 commits into from
Oct 4, 2019
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
48 changes: 48 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,50 +77,98 @@ jobs:
python: '3.6'
- env: TOXENV=py36-pytest46-xdist29-coverage50
python: '3.6'
- env: TOXENV=py36-pytest46-xdist30-coverage45
python: '3.6'
- env: TOXENV=py36-pytest46-xdist30-coverage50
python: '3.6'
- env: TOXENV=py36-pytest51-xdist29-coverage45
python: '3.6'
- env: TOXENV=py36-pytest51-xdist29-coverage50
python: '3.6'
- env: TOXENV=py36-pytest51-xdist30-coverage45
python: '3.6'
- env: TOXENV=py36-pytest51-xdist30-coverage50
python: '3.6'
- env: TOXENV=py36-pytest52-xdist29-coverage45
python: '3.6'
- env: TOXENV=py36-pytest52-xdist29-coverage50
python: '3.6'
- env: TOXENV=py36-pytest52-xdist30-coverage45
python: '3.6'
- env: TOXENV=py36-pytest52-xdist30-coverage50
python: '3.6'
- env: TOXENV=py37-pytest46-xdist29-coverage45
python: '3.7'
- env: TOXENV=py37-pytest46-xdist29-coverage50
python: '3.7'
- env: TOXENV=py37-pytest46-xdist30-coverage45
python: '3.7'
- env: TOXENV=py37-pytest46-xdist30-coverage50
python: '3.7'
- env: TOXENV=py37-pytest51-xdist29-coverage45
python: '3.7'
- env: TOXENV=py37-pytest51-xdist29-coverage50
python: '3.7'
- env: TOXENV=py37-pytest51-xdist30-coverage45
python: '3.7'
- env: TOXENV=py37-pytest51-xdist30-coverage50
python: '3.7'
- env: TOXENV=py37-pytest52-xdist29-coverage45
python: '3.7'
- env: TOXENV=py37-pytest52-xdist29-coverage50
python: '3.7'
- env: TOXENV=py37-pytest52-xdist30-coverage45
python: '3.7'
- env: TOXENV=py37-pytest52-xdist30-coverage50
python: '3.7'
- env: TOXENV=py38-pytest46-xdist29-coverage45
python: '3.8-dev'
- env: TOXENV=py38-pytest46-xdist29-coverage50
python: '3.8-dev'
- env: TOXENV=py38-pytest46-xdist30-coverage45
python: '3.8-dev'
- env: TOXENV=py38-pytest46-xdist30-coverage50
python: '3.8-dev'
- env: TOXENV=py38-pytest51-xdist29-coverage45
python: '3.8-dev'
- env: TOXENV=py38-pytest51-xdist29-coverage50
python: '3.8-dev'
- env: TOXENV=py38-pytest51-xdist30-coverage45
python: '3.8-dev'
- env: TOXENV=py38-pytest51-xdist30-coverage50
python: '3.8-dev'
- env: TOXENV=py38-pytest52-xdist29-coverage45
python: '3.8-dev'
- env: TOXENV=py38-pytest52-xdist29-coverage50
python: '3.8-dev'
- env: TOXENV=py38-pytest52-xdist30-coverage45
python: '3.8-dev'
- env: TOXENV=py38-pytest52-xdist30-coverage50
python: '3.8-dev'
- env: TOXENV=pypy3-pytest46-xdist29-coverage45
python: 'pypy3'
- env: TOXENV=pypy3-pytest46-xdist29-coverage50
python: 'pypy3'
- env: TOXENV=pypy3-pytest46-xdist30-coverage45
python: 'pypy3'
- env: TOXENV=pypy3-pytest46-xdist30-coverage50
python: 'pypy3'
- env: TOXENV=pypy3-pytest51-xdist29-coverage45
python: 'pypy3'
- env: TOXENV=pypy3-pytest51-xdist29-coverage50
python: 'pypy3'
- env: TOXENV=pypy3-pytest51-xdist30-coverage45
python: 'pypy3'
- env: TOXENV=pypy3-pytest51-xdist30-coverage50
python: 'pypy3'
- env: TOXENV=pypy3-pytest52-xdist29-coverage45
python: 'pypy3'
- env: TOXENV=pypy3-pytest52-xdist29-coverage50
python: 'pypy3'
- env: TOXENV=pypy3-pytest52-xdist30-coverage45
python: 'pypy3'
- env: TOXENV=pypy3-pytest52-xdist30-coverage50
python: 'pypy3'

- stage: examples
python: '3.6'
Expand Down
7 changes: 6 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ Authors
* Семён Марьясин - https://github.com/MarSoft
* Alexander Shadchin - https://github.com/shadchin
* Thomas Grainger - https://graingert.co.uk
* Ned Batchelder - https://nedbatchelder.com
* Juanjo Bazán - https://github.com/xuanxu
* Andrew Murray - https://github.com/radarhere
* Ned Batchelder - https://nedbatchelder.com/
* Albert Tugushev - https://github.com/atugushev
* Martín Gaitán - https://github.com/mgaitan
* Hugo van Kemenade - https://github.com/hugovk
46 changes: 40 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,47 @@
Changelog
=========

2.7.2.dev0 (unreleased)
-----------------------
2.8.0 (2019-10-03)
------------------

* Added --cov-context option for setting the coverage.py dynamic context for
each test.
* Match pytest-xdist master/worker terminology.
Contributed in `#321 <https://github.com/pytest-dev/pytest-cov/pull/321>`_
* Fixed ``RecursionError`` that can occur when using
`cleanup_on_signal <https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html#if-you-got-custom-signal-handling>`__ or
`cleanup_on_sigterm <https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html#if-you-got-custom-signal-handling>`__.
See: `#294 <https://github.com/pytest-dev/pytest-cov/issues/294>`_.
The 2.7.x releases of pytest-cov should be considered broken regarding aforementioned cleanup API.
* Added compatibility with future xdist release that deprecates some internals
(match pytest-xdist master/worker terminology).
Contributed by Thomas Grainger in `#321 <https://github.com/pytest-dev/pytest-cov/pull/321>`_
* Fixed breakage that occurs when multiple reporting options are used.
Contributed by Thomas Grainger in `#338 <https://github.com/pytest-dev/pytest-cov/pull/338>`_.
* Changed internals to use a stub instead of ``os.devnull``.
Contributed by Thomas Grainger in `#332 <https://github.com/pytest-dev/pytest-cov/pull/332>`_.
* Added support for Coverage 5.0.
Contributed by Ned Batchelder in `#319 <https://github.com/pytest-dev/pytest-cov/pull/319>`_.
* Added support for float values in ``--cov-fail-under``.
Contributed by Martín Gaitán in `#311 <https://github.com/pytest-dev/pytest-cov/pull/311>`_.
* Various documentation fixes. Contributed by
Juanjo Bazán,
Andrew Murray and
Albert Tugushev in
`#298 <https://github.com/pytest-dev/pytest-cov/pull/298>`_,
`#299 <https://github.com/pytest-dev/pytest-cov/pull/299>`_ and
`#307 <https://github.com/pytest-dev/pytest-cov/pull/307>`_.
* Various testing improvements. Contributed by
Ned Batchelder,
Daniel Hahler,
Ionel Cristian Mărieș and
Hugo van Kemenade in
`#313 <https://github.com/pytest-dev/pytest-cov/pull/313>`_,
`#314 <https://github.com/pytest-dev/pytest-cov/pull/314>`_,
`#315 <https://github.com/pytest-dev/pytest-cov/pull/315>`_,
`#316 <https://github.com/pytest-dev/pytest-cov/pull/316>`_,
`#325 <https://github.com/pytest-dev/pytest-cov/pull/325>`_,
`#326 <https://github.com/pytest-dev/pytest-cov/pull/326>`_,
`#334 <https://github.com/pytest-dev/pytest-cov/pull/334>`_ and
`#335 <https://github.com/pytest-dev/pytest-cov/pull/335>`_.
* Added the ``--cov-context`` CLI options that enables coverage contexts. Only works with coverage 5.0+.
Contributed by Ned Batchelder in `#345 <https://github.com/pytest-dev/pytest-cov/pull/345>`_.

2.7.1 (2019-05-03)
------------------
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ environment:
- TOXENV: 'py27-pytest310-xdist27-coverage45,py27-pytest46-xdist27-coverage45,py27-pytest310-xdist27-coverage50,py27-pytest46-xdist27-coverage50'
- TOXENV: 'py34-pytest310-xdist27-coverage45,py34-pytest46-xdist27-coverage45'
- TOXENV: 'py35-pytest310-xdist27-coverage45,py35-pytest46-xdist27-coverage45,py35-pytest310-xdist27-coverage50,py35-pytest46-xdist27-coverage50'
- TOXENV: 'py36-pytest310-xdist27-coverage45,py36-pytest46-xdist27-coverage45,py36-pytest310-xdist27-coverage50,py36-pytest46-xdist27-coverage50,py36-pytest46-xdist29-coverage45,py36-pytest46-xdist29-coverage50,py36-pytest51-xdist29-coverage45,py36-pytest51-xdist29-coverage50,py36-pytest52-xdist29-coverage45,py36-pytest52-xdist29-coverage50'
- TOXENV: 'py37-pytest310-xdist27-coverage45,py37-pytest46-xdist27-coverage45,py37-pytest310-xdist27-coverage50,py37-pytest46-xdist27-coverage50,py37-pytest46-xdist29-coverage45,py37-pytest46-xdist29-coverage50,py37-pytest51-xdist29-coverage45,py37-pytest51-xdist29-coverage50,py37-pytest52-xdist29-coverage45,py37-pytest52-xdist29-coverage50'
- TOXENV: 'py36-pytest310-xdist27-coverage45,py36-pytest46-xdist27-coverage45,py36-pytest310-xdist27-coverage50,py36-pytest46-xdist27-coverage50,py36-pytest46-xdist29-coverage45,py36-pytest46-xdist29-coverage50,py36-pytest46-xdist30-coverage45,py36-pytest46-xdist30-coverage50,py36-pytest51-xdist29-coverage45,py36-pytest51-xdist29-coverage50,py36-pytest51-xdist30-coverage45,py36-pytest51-xdist30-coverage50,py36-pytest52-xdist29-coverage45,py36-pytest52-xdist29-coverage50,py36-pytest52-xdist30-coverage45,py36-pytest52-xdist30-coverage50'
- TOXENV: 'py37-pytest310-xdist27-coverage45,py37-pytest46-xdist27-coverage45,py37-pytest310-xdist27-coverage50,py37-pytest46-xdist27-coverage50,py37-pytest46-xdist29-coverage45,py37-pytest46-xdist29-coverage50,py37-pytest46-xdist30-coverage45,py37-pytest46-xdist30-coverage50,py37-pytest51-xdist29-coverage45,py37-pytest51-xdist29-coverage50,py37-pytest51-xdist30-coverage45,py37-pytest51-xdist30-coverage50,py37-pytest52-xdist29-coverage45,py37-pytest52-xdist29-coverage50,py37-pytest52-xdist30-coverage45,py37-pytest52-xdist30-coverage50'
- TOXENV: 'pypy-pytest310-xdist27-coverage45,pypy-pytest46-xdist27-coverage45,pypy-pytest310-xdist27-coverage50,pypy-pytest46-xdist27-coverage50'

init:
Expand Down
48 changes: 37 additions & 11 deletions ci/bootstrap.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import os
import subprocess
import sys
from collections import defaultdict
from os.path import abspath
from os.path import dirname
from os.path import exists
from os.path import join

if __name__ == "__main__":
base_path = dirname(dirname(abspath(__file__)))
print("Project path: {0}".format(base_path))
base_path = dirname(dirname(abspath(__file__)))


def check_call(args):
print("+", *args)
subprocess.check_call(args)

def exec_in_env():
env_path = join(base_path, ".tox", "bootstrap")
if sys.platform == "win32":
bin_path = join(env_path, "Scripts")
Expand All @@ -23,19 +31,26 @@

print("Making bootstrap env in: {0} ...".format(env_path))
try:
subprocess.check_call(["virtualenv", env_path])
check_call([sys.executable, "-m", "venv", env_path])
except subprocess.CalledProcessError:
subprocess.check_call([sys.executable, "-m", "virtualenv", env_path])
try:
check_call([sys.executable, "-m", "virtualenv", env_path])
except subprocess.CalledProcessError:
check_call(["virtualenv", env_path])
print("Installing `jinja2` into bootstrap environment...")
subprocess.check_call([join(bin_path, "pip"), "install", "jinja2"])
check_call([join(bin_path, "pip"), "install", "jinja2", "tox"])
python_executable = join(bin_path, "python")
if not os.path.samefile(python_executable, sys.executable):
print("Re-executing with: {0}".format(python_executable))
os.execv(python_executable, [python_executable, __file__])
if not os.path.exists(python_executable):
python_executable += '.exe'

print("Re-executing with: {0}".format(python_executable))
print("+ exec", python_executable, __file__, "--no-env")
os.execv(python_executable, [python_executable, __file__, "--no-env"])

def main():
import jinja2

import subprocess
print("Project path: {0}".format(base_path))

jinja = jinja2.Environment(
loader=jinja2.FileSystemLoader(join(base_path, "ci", "templates")),
Expand Down Expand Up @@ -63,3 +78,14 @@
fh.write(jinja.get_template(name).render(**template_vars))
print("Wrote {}".format(name))
print("DONE.")

if __name__ == "__main__":
args = sys.argv[1:]
if args == ["--no-env"]:
main()
elif not args:
exec_in_env()
else:
print("Unexpected arguments {0}".format(args), file=sys.stderr)
sys.exit(1)

3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ envlist =
check
py{27,34,35,36,37,py,py3}-pytest{310,46}-xdist27-coverage45
py{27,35,36,37,py,py3}-pytest{310,46}-xdist27-coverage50
py{36,37,38,py3}-pytest{46,51,52}-xdist29-coverage{45,50}
py{36,37,38,py3}-pytest{46,51,52}-xdist{29,30}-coverage{45,50}
docs

[testenv]
Expand All @@ -28,6 +28,7 @@ setenv =
xdist27: _DEP_PYTESTXDIST=pytest-xdist==1.27.0
xdist28: _DEP_PYTESTXDIST=pytest-xdist==1.28.0
xdist29: _DEP_PYTESTXDIST=pytest-xdist==1.29.0
xdist30: _DEP_PYTESTXDIST=pytest-xdist==1.30.0

coverage45: _DEP_COVERAGE=coverage==4.5.4
coverage50: _DEP_COVERAGE=coverage==5.0a8
Expand Down