Hello community,
here is the log from the commit of package python-pytest-click for
openSUSE:Factory checked in at 2020-10-08 13:14:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-click (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-click.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-click"
Thu Oct 8 13:14:12 2020 rev:3 rq:840183 version:1.0.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-click/python-pytest-click.changes
2019-06-01 09:58:26.611133507 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-click.new.4249/python-pytest-click.changes
2020-10-08 13:14:24.579293325 +0200
@@ -1,0 +2,11 @@
+Wed Oct 7 18:42:23 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- Update to 1.0.2
+ * Replace yield_fixture with fixture
+ * Drop Python 3.4 support
+ * Drop Python 2.7 support
+ * Add builds for Python 3.8, 3.9
+ * Include test to package
+- Actually download source tarball
+
+-------------------------------------------------------------------
Old:
----
pytest-click-0.3.tar.gz
New:
----
pytest-click-1.0.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-click.spec ++++++
--- /var/tmp/diff_new_pack.KUjji1/_old 2020-10-08 13:14:25.119293813 +0200
+++ /var/tmp/diff_new_pack.KUjji1/_new 2020-10-08 13:14:25.123293817 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-click
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,15 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
Name: python-pytest-click
-Version: 0.3
+Version: 1.0.2
Release: 0
Summary: Pytest plugin for Click
License: MIT
Group: Development/Languages/Python
URL: https://github.com/Stranger6667/pytest-click
-Source: pytest-click-%{version}.tar.gz
+Source:
https://github.com/Stranger6667/pytest-click/archive/v%{version}.tar.gz#/pytest-click-%{version}.tar.gz
BuildRequires: %{python_module mock}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -34,7 +35,7 @@
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module click >= 6.0}
-BuildRequires: %{python_module pytest >= 3.6.0}
+BuildRequires: %{python_module pytest >= 5.0}
# /SECTION
%python_subpackages
@@ -54,7 +55,7 @@
%check
export LANG=C.UTF-8
-%python_exec setup.py test
+%pytest
%files %{python_files}
%doc CHANGELOG.md README.rst
++++++ pytest-click-0.3.tar.gz -> pytest-click-1.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.coveragerc
new/pytest-click-1.0.2/.coveragerc
--- old/pytest-click-0.3/.coveragerc 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/.coveragerc 2020-08-29 12:20:26.000000000 +0200
@@ -1,5 +1,12 @@
[run]
branch = true
+parallel = true
+source = pytest_click
+
+[paths]
+source =
+ src/pytest_click
+ .tox/*/lib/python*/site-packages/pytest_click
[report]
show_missing = true
@@ -8,4 +15,4 @@
omit = */tests/*
setup.py
*/*.egg/*
- */*.egg-info/*
\ No newline at end of file
+ */*.egg-info/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.github/FUNDING.yml
new/pytest-click-1.0.2/.github/FUNDING.yml
--- old/pytest-click-0.3/.github/FUNDING.yml 1970-01-01 01:00:00.000000000
+0100
+++ new/pytest-click-1.0.2/.github/FUNDING.yml 2020-08-29 12:20:26.000000000
+0200
@@ -0,0 +1 @@
+github: Stranger6667
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.github/workflows/build.yml
new/pytest-click-1.0.2/.github/workflows/build.yml
--- old/pytest-click-0.3/.github/workflows/build.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/.github/workflows/build.yml 2020-08-29
12:20:26.000000000 +0200
@@ -0,0 +1,84 @@
+name: Build jobs
+# Triggered by changes in code-specific or job-specific files
+
+on:
+ pull_request:
+ paths:
+ - '**.py'
+ - '.github/workflows/*.yml'
+ - '.pylintrc'
+ - '.pre-commit-config.yaml'
+ - '.pydocstyle'
+ - '.relint.yml'
+ - '.yamllint'
+ - 'tox.ini'
+ push:
+ branches:
+ - master
+
+jobs:
+ pre-commit:
+ name: Generic pre-commit checks
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+
+ - uses: actions/setup-python@v2
+ with:
+ python-version: 3.7
+
+ - run: pip install pre-commit
+ - run: SKIP=pylint pre-commit run --all-files
+
+ pylint:
+ name: Pylint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+
+ - uses: actions/setup-python@v2
+ with:
+ python-version: 3.7
+
+ - run: pip install pre-commit
+ - run: pre-commit run pylint --all-files
+
+ tests:
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest]
+ python: [3.5, 3.6, 3.7, 3.8, 3.9.0-rc.1, pypy3]
+
+ name: ${{ matrix.os }}/tests_${{ matrix.python }}
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+
+ - uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python }}
+
+ - run: pip install tox coverage
+
+ - name: Run ${{ matrix.python }} tox job
+ run: tox -e py
+ env:
+ TOX_JOB: ${{ matrix.python }}
+
+ - run: coverage combine
+ - run: coverage report
+ - run: coverage xml -i
+
+ - name: Upload coverage to Codecov
+ uses: codecov/[email protected]
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ file: ./coverage.xml
+ flags: unittests
+ name: codecov-py${{ matrix.python }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.github/workflows/commit.yml
new/pytest-click-1.0.2/.github/workflows/commit.yml
--- old/pytest-click-0.3/.github/workflows/commit.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/.github/workflows/commit.yml 2020-08-29
12:20:26.000000000 +0200
@@ -0,0 +1,18 @@
+name: Checks for every commit
+
+on:
+ pull_request: ~
+ push:
+ branches:
+ - master
+
+
+jobs:
+ commitsar:
+ name: Verify commit messages
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v1
+ - name: Run commitsar
+ uses: docker://commitsar/commitsar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.github/workflows/release.yml
new/pytest-click-1.0.2/.github/workflows/release.yml
--- old/pytest-click-0.3/.github/workflows/release.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/.github/workflows/release.yml 2020-08-29
12:20:26.000000000 +0200
@@ -0,0 +1,41 @@
+name: Post-release jobs
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ build-n-publish:
+ name: Build and publish Python 🐍 distributions 📦 to PyPI
+ runs-on: ubuntu-18.04
+ steps:
+ - uses: actions/checkout@master
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+ - name: Install tox
+ run: >-
+ python -m
+ pip install
+ tox
+ --user
+ - name: Build a binary wheel and a source tarball
+ run: >-
+ python -m tox -e build
+ - name: Publish distribution 📦 to PyPI
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ password: ${{ secrets.PYPI_TOKEN }}
+
+ release-notes:
+ name: Release Notes
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v1
+
+ - name: Release Notary Action
+ uses: docker://outillage/release-notary
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.gitignore
new/pytest-click-1.0.2/.gitignore
--- old/pytest-click-0.3/.gitignore 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/.gitignore 2020-08-29 12:20:26.000000000 +0200
@@ -45,4 +45,4 @@
.env
.bootstrap
*.bak
-.cache
\ No newline at end of file
+.cache
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.isort.cfg
new/pytest-click-1.0.2/.isort.cfg
--- old/pytest-click-0.3/.isort.cfg 1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/.isort.cfg 2020-08-29 12:20:26.000000000 +0200
@@ -0,0 +1,2 @@
+[settings]
+known_third_party = click,pytest,setuptools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.pre-commit-config.yaml
new/pytest-click-1.0.2/.pre-commit-config.yaml
--- old/pytest-click-0.3/.pre-commit-config.yaml 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/.pre-commit-config.yaml 2020-08-29
12:20:26.000000000 +0200
@@ -0,0 +1,61 @@
+default_language_version:
+ python: python3.7
+
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v3.2.0
+ hooks:
+ - id: check-yaml
+ - id: end-of-file-fixer
+ - id: trailing-whitespace
+ exclude: ^.*\.(md|rst)$
+ - id: debug-statements
+ - id: mixed-line-ending
+ args: [--fix=lf]
+ - id: check-merge-conflict
+
+ - repo: https://github.com/jorisroovers/gitlint
+ rev: v0.13.1
+ hooks:
+ - id: gitlint
+
+ - repo: https://github.com/adrienverge/yamllint
+ rev: v1.23.0
+ hooks:
+ - id: yamllint
+
+ - repo: https://github.com/PyCQA/pydocstyle
+ rev: 5.1.0
+ hooks:
+ - id: pydocstyle
+
+ - repo: https://github.com/codingjoe/relint
+ rev: 1.2.1
+ hooks:
+ - id: relint
+
+ - repo: https://github.com/ambv/black
+ rev: 20.8b1
+ hooks:
+ - id: black
+ types: [python]
+
+ - repo: https://github.com/asottile/seed-isort-config
+ rev: v2.2.0
+ hooks:
+ - id: seed-isort-config
+
+ - repo: https://github.com/pre-commit/mirrors-isort
+ rev: v5.4.2
+ hooks:
+ - id: isort
+ additional_dependencies: ["isort[pyproject]"]
+
+ - repo: https://github.com/pre-commit/mirrors-pylint
+ rev: v2.6.0
+ hooks:
+ - id: pylint
+ additional_dependencies: ["isort[pyproject]"]
+ exclude: ^(docs/|test/).*$
+ # disabled import-error as may be run out of environment with deps
+ args: ["--disable=import-error"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.pydocstyle
new/pytest-click-1.0.2/.pydocstyle
--- old/pytest-click-0.3/.pydocstyle 1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/.pydocstyle 2020-08-29 12:20:26.000000000 +0200
@@ -0,0 +1,5 @@
+[pydocstyle]
+# D100-D107 ignore missing docstrings
+# D203 disabled in favor of D211
+# D213 disabled in favor of D212
+ignore = D100,D101,D102,D103,D104,D105,D106,D107,D202,D203,D213,D401,D407
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.pylintrc
new/pytest-click-1.0.2/.pylintrc
--- old/pytest-click-0.3/.pylintrc 1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/.pylintrc 2020-08-29 12:20:26.000000000 +0200
@@ -0,0 +1,33 @@
+[MASTER]
+# jobs=0 means 'use all CPUs'
+jobs=0
+
+[MESSAGES CONTROL]
+disable =
+ missing-docstring,
+ line-too-long,
+ invalid-name,
+ no-value-for-parameter,
+ no-member,
+ unused-argument,
+ broad-except,
+ relative-import,
+ wrong-import-position,
+ bare-except,
+ locally-disabled,
+ protected-access,
+ abstract-method,
+ no-self-use,
+ fixme,
+ too-few-public-methods,
+ bad-continuation,
+ inconsistent-return-statements
+
+
+[REPORTS]
+output-format=colorized
+
+[FORMAT]
+logging-modules=
+ logging,
+ structlog,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.relint.yml
new/pytest-click-1.0.2/.relint.yml
--- old/pytest-click-0.3/.relint.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/.relint.yml 2020-08-29 12:20:26.000000000 +0200
@@ -0,0 +1,11 @@
+- name: Fix it now
+ pattern: "[fF][iI][xX][mM][eE]"
+ filePattern: ".*.py$"
+
+- name: IPython debug leftover
+ pattern: "IPython\\.embed()"
+ filePattern: ".*.py$"
+
+- name: Leftover print
+ pattern: "print\\("
+ filePattern: ^(?!.*conftest).*\.py$
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.travis.yml
new/pytest-click-1.0.2/.travis.yml
--- old/pytest-click-0.3/.travis.yml 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-language: python
-dist: xenial
-matrix:
- include:
- - python: 3.5
- env:
- - TOX_ENV=py27
- - python: 3.5
- dist: trusty
- env:
- - TOX_ENV=py34
- - python: 3.5
- env:
- - TOX_ENV=py35
- - python: 3.6
- env:
- - TOX_ENV=py36
- - python: 3.7
- sudo: true
- env:
- - TOX_ENV=py37
- - python: "pypy2.7-6.0"
- env:
- - TOX_ENV=pypy
- allow_failures:
- - python: 3.4
- fast_finish: true
-install:
- - travis_retry pip install tox
-script:
- - tox -e $TOX_ENV
-after_success:
- - bash <(curl -s https://codecov.io/bash)
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/.yamllint
new/pytest-click-1.0.2/.yamllint
--- old/pytest-click-0.3/.yamllint 1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/.yamllint 2020-08-29 12:20:26.000000000 +0200
@@ -0,0 +1,4 @@
+extends: relaxed
+rules:
+ line-length:
+ max: 120
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/CHANGELOG.md
new/pytest-click-1.0.2/CHANGELOG.md
--- old/pytest-click-0.3/CHANGELOG.md 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/CHANGELOG.md 2020-08-29 12:20:26.000000000 +0200
@@ -1,6 +1,27 @@
History
-------
+1.0.2 - 29.08.2020
+----------------
+
+- Format code examples with "black".
+
+1.0.1 - 29.08.2020
+----------------
+
+- Include "test" to the package itself.
+
+1.0.0 - 29.08.2020
+----------------
+
+- Added builds for Python 3.8 & 3.9
+- Drop support for Python 2.7 & 3.4
+
+0.3.1 - 28.08.2020
+----------------
+
+- Move to `src` layout
+
0.3 - 05.01.2019
----------------
@@ -15,4 +36,4 @@
0.1 - 29.01.2016
----------------
-* Initial release.
\ No newline at end of file
+* Initial release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/LICENSE
new/pytest-click-1.0.2/LICENSE
--- old/pytest-click-0.3/LICENSE 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/LICENSE 2020-08-29 12:20:26.000000000 +0200
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2016-2017 Dmitry Dygalo
+Copyright (c) 2016-2020 Dmitry Dygalo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
+THE SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/MANIFEST.in
new/pytest-click-1.0.2/MANIFEST.in
--- old/pytest-click-0.3/MANIFEST.in 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/MANIFEST.in 2020-08-29 12:20:26.000000000 +0200
@@ -1,6 +1,6 @@
include CHANGELOG.md
include README.rst
-recursive-include tests *
+recursive-include test *
recursive-exclude * __pycache__
-recursive-exclude * *.py[co]
\ No newline at end of file
+recursive-exclude * *.py[co]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/Makefile
new/pytest-click-1.0.2/Makefile
--- old/pytest-click-0.3/Makefile 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/Makefile 2020-08-29 12:20:26.000000000 +0200
@@ -4,8 +4,6 @@
@echo "clean-pyc - remove Python file artifacts"
@echo "clean-test - remove test and coverage artifacts"
@echo "test - run tests quickly with the default Python"
- @echo "test-all - run tests on every Python version with tox"
- @echo "coverage - check code coverage quickly with the default Python"
@echo "install - install the package to the active Python's
site-packages"
clean: clean-build clean-pyc clean-test
@@ -31,13 +29,7 @@
rm -fr reports/
test:
- python setup.py test -a "--cov pytest_click tests -p no:pytest_click"
-
-coverage:
- coverage run --source pytest_click setup.py test
- coverage report -m
- coverage html
- open htmlcov/index.html
+ tox -e py
install: clean
- python setup.py install
\ No newline at end of file
+ python setup.py install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/README.rst
new/pytest-click-1.0.2/README.rst
--- old/pytest-click-0.3/README.rst 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/README.rst 2020-08-29 12:20:26.000000000 +0200
@@ -2,7 +2,7 @@
============
Py.test plugin for `Click <http://click.pocoo.org/>`_.
-|Build Status| |codecov.io|
+|Build| |Coverage| |Version| |Python versions| |License|
Installation
@@ -14,19 +14,6 @@
pip install pytest_click
-or:
-
-::
-
- easy_install pytest_click
-
-or from source:
-
-::
-
- $ sudo python setup.py install
-
-
Usage
-----
@@ -38,15 +25,14 @@
def test_cli(cli_runner):
-
@click.command()
- @click.argument('name')
+ @click.argument("name")
def hello(name):
- click.echo('Hello %s!' % name)
+ click.echo("Hello %s!" % name)
- result = cli_runner.invoke(hello, ['Peter'])
+ result = cli_runner.invoke(hello, ["Peter"])
assert result.exit_code == 0
- assert result.output == 'Hello Peter!\n'
+ assert result.output == "Hello Peter!\n"
.. code:: python
@@ -54,18 +40,17 @@
def test_fixture(isolated_cli_runner):
-
@click.command()
- @click.argument('f', type=click.File())
+ @click.argument("f", type=click.File())
def cat(f):
click.echo(f.read())
- with open('hello.txt', 'w') as f:
- f.write('Hello World!')
+ with open("hello.txt", "w") as f:
+ f.write("Hello World!")
- result = isolated_cli_runner.invoke(cat, ['hello.txt'])
+ result = isolated_cli_runner.invoke(cat, ["hello.txt"])
assert result.exit_code == 0
- assert result.output == 'Hello World!\n'
+ assert result.output == "Hello World!\n"
Both runners can be configured via ``runner_setup`` mark:
@@ -74,20 +59,20 @@
import pytest
- @pytest.mark.runner_setup(charset='cp1251', env={'test': 1},
echo_stdin=True)
+ @pytest.mark.runner_setup(charset="cp1251", env={"test": 1},
echo_stdin=True)
def test_runner_setup(cli_runner):
...
All kwargs will be passed to ``click.testing.CliRunner`` initialization.
-Python support
---------------
-
-pytest-click supports Python 2.7, 3.4, 3.5, 3.6 and PyPy.
-
-
-.. |Build Status| image::
https://travis-ci.org/Stranger6667/pytest-click.svg?branch=master
- :target: https://travis-ci.org/Stranger6667/pytest-click
-.. |codecov.io| image::
https://codecov.io/github/Stranger6667/pytest-click/coverage.svg?branch=master
- :target: https://codecov.io/github/Stranger6667/pytest-click?branch=master
\ No newline at end of file
+.. |Build| image:: image::
https://github.com/Stranger6667/pytest-click/workflows/build/badge.svg
+ :target: https://github.com/Stranger6667/pytest-click/actions
+.. |Coverage| image::
https://codecov.io/github/Stranger6667/pytest-click/coverage.svg?branch=master
+ :target: https://codecov.io/github/Stranger6667/pytest-click?branch=master
+.. |Version| image:: https://img.shields.io/pypi/v/pytest-click.svg
+ :target: https://pypi.org/project/pytest-click/
+.. |Python versions| image::
https://img.shields.io/pypi/pyversions/pytest-click.svg
+ :target: https://pypi.org/project/pytest-click/
+.. |License| image:: https://img.shields.io/pypi/l/pytest-click.svg
+ :target: https://opensource.org/licenses/MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/pyproject.toml
new/pytest-click-1.0.2/pyproject.toml
--- old/pytest-click-0.3/pyproject.toml 1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/pyproject.toml 2020-08-29 12:20:26.000000000
+0200
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools >= 40.6.0", "wheel"]
+build-backend = "setuptools.build_meta"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/pytest_click/__init__.py
new/pytest-click-1.0.2/pytest_click/__init__.py
--- old/pytest-click-0.3/pytest_click/__init__.py 2019-01-05
20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/pytest_click/__init__.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-# coding: utf-8
-from .fixtures import cli_runner, isolated_cli_runner
-
-
-def pytest_configure(config):
- config.addinivalue_line(
- 'markers', 'runner_setup(**kwargs): Pass kwargs to
`click.testing.CliRunner` initialization.'
- )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/pytest_click/fixtures.py
new/pytest-click-1.0.2/pytest_click/fixtures.py
--- old/pytest-click-0.3/pytest_click/fixtures.py 2019-01-05
20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/pytest_click/fixtures.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-# coding: utf-8
-import pytest
-from click.testing import CliRunner
-
-
[email protected]
-def cli_runner(request):
- """
- Instance of `click.testing.CliRunner`. Can be configured with
`@pytest.mark.runner_setup`
-
- @pytest.mark.runner_setup(charset='cp1251')
- def test_something(cli_runner):
- ...
- """
- init_kwargs = {}
- marker = request.node.get_closest_marker('runner_setup')
- if marker:
- init_kwargs = marker.kwargs
- return CliRunner(**init_kwargs)
-
-
[email protected]_fixture
-def isolated_cli_runner(cli_runner):
- """
- Instance of `click.testing.CliRunner` with automagically
`isolated_filesystem()` called.
- """
- with cli_runner.isolated_filesystem():
- yield cli_runner
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/setup.cfg
new/pytest-click-1.0.2/setup.cfg
--- old/pytest-click-0.3/setup.cfg 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/setup.cfg 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-[bdist_wheel]
-universal = 1
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/setup.py
new/pytest-click-1.0.2/setup.py
--- old/pytest-click-0.3/setup.py 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/setup.py 2020-08-29 12:20:26.000000000 +0200
@@ -1,74 +1,52 @@
#!/usr/bin/env python
-# coding: utf-8
-import sys
+from os import path
-from setuptools import setup
-from setuptools.command.test import test as TestCommand
-
-
-class PyTest(TestCommand):
- user_options = [('pytest-args=', 'a', 'Arguments to pass into py.test')]
-
- def initialize_options(self):
- TestCommand.initialize_options(self)
- self.pytest_args = []
-
- def finalize_options(self):
- TestCommand.finalize_options(self)
- self.test_args = []
- self.test_suite = True
-
- def run_tests(self):
- import pytest
-
- errno = pytest.main(self.pytest_args)
- sys.exit(errno)
+from setuptools import find_packages, setup
+this_directory = path.abspath(path.dirname(__file__))
+with open(path.join(this_directory, "README.rst")) as fd:
+ long_description = fd.read()
requirements = [
- 'click>=6.0',
- 'pytest>=3.6.0',
+ "click>=6.0",
+ "pytest>=5.0",
]
-test_requirements = ['pytest-cov>=1.8']
-
-if sys.version_info < (3, 3):
- test_requirements.append('mock==1.0.1')
-
setup(
- name='pytest_click',
- version='0.3',
- packages=['pytest_click'],
- url='https://github.com/Stranger6667/pytest-click',
- license='MIT',
- author='Dmitry Dygalo',
- author_email='[email protected]',
- maintainer='Dmitry Dygalo',
- maintainer_email='[email protected]',
- description='Py.test plugin for Click',
+ name="pytest_click",
+ version="1.0.2",
+ url="https://github.com/Stranger6667/pytest-click",
+ license="MIT",
+ author="Dmitry Dygalo",
+ author_email="[email protected]",
+ maintainer="Dmitry Dygalo",
+ maintainer_email="[email protected]",
+ description="Py.test plugin for Click",
+ long_description=long_description,
+ long_description_content_type="text/x-rst",
classifiers=[
- 'Development Status :: 4 - Beta',
- 'Environment :: Console',
- 'Intended Audience :: Developers',
- 'Operating System :: OS Independent',
- 'License :: OSI Approved :: MIT License',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.4',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: 3.7',
- 'Programming Language :: Python :: Implementation :: CPython',
- 'Programming Language :: Python :: Implementation :: PyPy',
- 'Topic :: Software Development :: Testing',
+ "Development Status :: 5 - Production/Stable",
+ "Environment :: Console",
+ "Intended Audience :: Developers",
+ "Operating System :: OS Independent",
+ "License :: OSI Approved :: MIT License",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Programming Language :: Python :: Implementation :: PyPy",
+ "Topic :: Software Development :: Testing",
],
- cmdclass={'test': PyTest},
include_package_data=True,
+ packages=find_packages(where="src"),
+ package_dir={"": "src"},
install_requires=requirements,
- tests_require=test_requirements,
entry_points={
- 'pytest11': [
- 'pytest_click = pytest_click',
+ "pytest11": [
+ "pytest_click = pytest_click",
]
},
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/src/pytest_click/__init__.py
new/pytest-click-1.0.2/src/pytest_click/__init__.py
--- old/pytest-click-0.3/src/pytest_click/__init__.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/src/pytest_click/__init__.py 2020-08-29
12:20:26.000000000 +0200
@@ -0,0 +1,8 @@
+from .fixtures import cli_runner, isolated_cli_runner
+
+
+def pytest_configure(config):
+ config.addinivalue_line(
+ "markers",
+ "runner_setup(**kwargs): Pass kwargs to `click.testing.CliRunner`
initialization.",
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/src/pytest_click/fixtures.py
new/pytest-click-1.0.2/src/pytest_click/fixtures.py
--- old/pytest-click-0.3/src/pytest_click/fixtures.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/src/pytest_click/fixtures.py 2020-08-29
12:20:26.000000000 +0200
@@ -0,0 +1,25 @@
+# pylint: disable=redefined-outer-name
+import pytest
+from click.testing import CliRunner
+
+
[email protected]
+def cli_runner(request):
+ """Instance of `click.testing.CliRunner`. Can be configured with
`@pytest.mark.runner_setup`.
+
+ @pytest.mark.runner_setup(charset="cp1251")
+ def test_something(cli_runner):
+ ...
+ """
+ init_kwargs = {}
+ marker = request.node.get_closest_marker("runner_setup")
+ if marker:
+ init_kwargs = marker.kwargs
+ return CliRunner(**init_kwargs)
+
+
[email protected]
+def isolated_cli_runner(cli_runner):
+ """Instance of `click.testing.CliRunner` with automagically
`isolated_filesystem()` called."""
+ with cli_runner.isolated_filesystem():
+ yield cli_runner
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/test/__init__.py
new/pytest-click-1.0.2/test/__init__.py
--- old/pytest-click-0.3/test/__init__.py 1970-01-01 01:00:00.000000000
+0100
+++ new/pytest-click-1.0.2/test/__init__.py 2020-08-29 12:20:26.000000000
+0200
@@ -0,0 +1 @@
+# coding: utf-8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/test/conftest.py
new/pytest-click-1.0.2/test/conftest.py
--- old/pytest-click-0.3/test/conftest.py 1970-01-01 01:00:00.000000000
+0100
+++ new/pytest-click-1.0.2/test/conftest.py 2020-08-29 12:20:26.000000000
+0200
@@ -0,0 +1,4 @@
+# coding: utf-8
+
+
+pytest_plugins = "pytester"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/test/fixtures/__init__.py
new/pytest-click-1.0.2/test/fixtures/__init__.py
--- old/pytest-click-0.3/test/fixtures/__init__.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/test/fixtures/__init__.py 2020-08-29
12:20:26.000000000 +0200
@@ -0,0 +1 @@
+# coding: utf-8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/test/fixtures/test_cli_runner.py
new/pytest-click-1.0.2/test/fixtures/test_cli_runner.py
--- old/pytest-click-0.3/test/fixtures/test_cli_runner.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/test/fixtures/test_cli_runner.py 2020-08-29
12:20:26.000000000 +0200
@@ -0,0 +1,59 @@
+# coding: utf-8
+
+
+def test_fixture(testdir):
+ testdir.makepyfile(
+ """
+ from click.testing import CliRunner
+
+ def test_fixture(cli_runner):
+ assert isinstance(cli_runner, CliRunner)
+ """
+ )
+ result = testdir.runpytest("--verbose")
+ result.stdout.fnmatch_lines("test_fixture.py::test_fixture PASSED*")
+
+
+def test_real_invocation(testdir):
+ testdir.makepyfile(
+ """
+ import click
+
+ def test_fixture(cli_runner):
+
+ @click.command()
+ @click.argument('name')
+ def hello(name):
+ click.echo('Hello %s!' % name)
+
+ result = cli_runner.invoke(hello, ['Peter'])
+ assert result.exit_code == 0
+ assert result.output == 'Hello Peter!\\n'
+ """
+ )
+ result = testdir.runpytest("--verbose")
+ result.stdout.fnmatch_lines("test_real_invocation.py::test_fixture
PASSED*")
+
+
+def test_runner_setup(testdir):
+ testdir.makepyfile(
+ """
+ import pytest
+
+ @pytest.mark.runner_setup(charset='cp1251', env={'test': 1},
echo_stdin=True)
+ def test_runner_setup(cli_runner):
+ assert cli_runner.charset == 'cp1251'
+ assert cli_runner.env == {'test': 1}
+ assert cli_runner.echo_stdin
+ """
+ )
+ result = testdir.runpytest("--verbose")
+ result.stdout.fnmatch_lines("test_runner_setup.py::test_runner_setup
PASSED*")
+
+
+def test_docstring(testdir):
+ result = testdir.runpytest("--fixtures")
+ assert (
+ " Instance of `click.testing.CliRunner`. Can be "
+ "configured with `@pytest.mark.runner_setup`." in result.stdout.lines
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-click-0.3/test/fixtures/test_isolated_cli_runner.py
new/pytest-click-1.0.2/test/fixtures/test_isolated_cli_runner.py
--- old/pytest-click-0.3/test/fixtures/test_isolated_cli_runner.py
1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-click-1.0.2/test/fixtures/test_isolated_cli_runner.py
2020-08-29 12:20:26.000000000 +0200
@@ -0,0 +1,62 @@
+# coding: utf-8
+
+
+def test_fixture(testdir):
+ testdir.makeconftest(
+ """
+ try:
+ from mock import patch, Mock
+ except ImportError:
+ from unittest.mock import patch, Mock
+
+ def pytest_configure(config):
+ config.patched =
patch('pytest_click.fixtures.CliRunner.isolated_filesystem')
+ config.patched.start()
+
+ def pytest_unconfigure(config):
+ config.patched.stop()
+ """
+ )
+ testdir.makepyfile(
+ """
+ from click.testing import CliRunner
+
+ def test_fixture(isolated_cli_runner):
+ assert isinstance(isolated_cli_runner, CliRunner)
+ assert isolated_cli_runner.isolated_filesystem.called
+ """
+ )
+ result = testdir.runpytest("--verbose")
+ result.stdout.fnmatch_lines("test_fixture.py::test_fixture PASSED*")
+
+
+def test_real_invocation(testdir):
+ testdir.makepyfile(
+ """
+ import click
+
+ def test_fixture(isolated_cli_runner):
+
+ @click.command()
+ @click.argument('f', type=click.File())
+ def cat(f):
+ click.echo(f.read())
+
+ with open('hello.txt', 'w') as f:
+ f.write('Hello World!')
+
+ result = isolated_cli_runner.invoke(cat, ['hello.txt'])
+ assert result.exit_code == 0
+ assert result.output == 'Hello World!\\n'
+ """
+ )
+ result = testdir.runpytest("--verbose")
+ result.stdout.fnmatch_lines("test_real_invocation.py::test_fixture
PASSED*")
+
+
+def test_docstring(testdir):
+ result = testdir.runpytest("--fixtures")
+ assert (
+ " Instance of `click.testing.CliRunner` with "
+ "automagically `isolated_filesystem()` called." in result.stdout.lines
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/test/test_plugin.py
new/pytest-click-1.0.2/test/test_plugin.py
--- old/pytest-click-0.3/test/test_plugin.py 1970-01-01 01:00:00.000000000
+0100
+++ new/pytest-click-1.0.2/test/test_plugin.py 2020-08-29 12:20:26.000000000
+0200
@@ -0,0 +1,10 @@
+# coding: utf-8
+
+
+def test_markers(testdir):
+ result = testdir.runpytest("--markers")
+ assert (
+ "@pytest.mark.runner_setup(**kwargs): "
+ "Pass kwargs to `click.testing.CliRunner` initialization."
+ in result.stdout.lines
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/tests/__init__.py
new/pytest-click-1.0.2/tests/__init__.py
--- old/pytest-click-0.3/tests/__init__.py 2019-01-05 20:36:55.000000000
+0100
+++ new/pytest-click-1.0.2/tests/__init__.py 1970-01-01 01:00:00.000000000
+0100
@@ -1 +0,0 @@
-# coding: utf-8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/tests/conftest.py
new/pytest-click-1.0.2/tests/conftest.py
--- old/pytest-click-0.3/tests/conftest.py 2019-01-05 20:36:55.000000000
+0100
+++ new/pytest-click-1.0.2/tests/conftest.py 1970-01-01 01:00:00.000000000
+0100
@@ -1,4 +0,0 @@
-# coding: utf-8
-
-
-pytest_plugins = 'pytester'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/tests/fixtures/__init__.py
new/pytest-click-1.0.2/tests/fixtures/__init__.py
--- old/pytest-click-0.3/tests/fixtures/__init__.py 2019-01-05
20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/tests/fixtures/__init__.py 1970-01-01
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-# coding: utf-8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/tests/fixtures/test_cli_runner.py
new/pytest-click-1.0.2/tests/fixtures/test_cli_runner.py
--- old/pytest-click-0.3/tests/fixtures/test_cli_runner.py 2019-01-05
20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/tests/fixtures/test_cli_runner.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,51 +0,0 @@
-# coding: utf-8
-
-
-def test_fixture(testdir):
- testdir.makepyfile('''
- from click.testing import CliRunner
-
- def test_fixture(cli_runner):
- assert isinstance(cli_runner, CliRunner)
- ''')
- result = testdir.runpytest('--verbose')
- result.stdout.fnmatch_lines("test_fixture.py::test_fixture PASSED*")
-
-
-def test_real_invocation(testdir):
- testdir.makepyfile('''
- import click
-
- def test_fixture(cli_runner):
-
- @click.command()
- @click.argument('name')
- def hello(name):
- click.echo('Hello %s!' % name)
-
- result = cli_runner.invoke(hello, ['Peter'])
- assert result.exit_code == 0
- assert result.output == 'Hello Peter!\\n'
- ''')
- result = testdir.runpytest('--verbose')
- result.stdout.fnmatch_lines('test_real_invocation.py::test_fixture
PASSED*')
-
-
-def test_runner_setup(testdir):
- testdir.makepyfile('''
- import pytest
-
- @pytest.mark.runner_setup(charset='cp1251', env={'test': 1},
echo_stdin=True)
- def test_runner_setup(cli_runner):
- assert cli_runner.charset == 'cp1251'
- assert cli_runner.env == {'test': 1}
- assert cli_runner.echo_stdin
- ''')
- result = testdir.runpytest('--verbose')
- result.stdout.fnmatch_lines('test_runner_setup.py::test_runner_setup
PASSED*')
-
-
-def test_docstring(testdir):
- result = testdir.runpytest('--fixtures')
- assert ' Instance of `click.testing.CliRunner`. Can be ' \
- 'configured with `@pytest.mark.runner_setup`' in result.stdout.lines
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-click-0.3/tests/fixtures/test_isolated_cli_runner.py
new/pytest-click-1.0.2/tests/fixtures/test_isolated_cli_runner.py
--- old/pytest-click-0.3/tests/fixtures/test_isolated_cli_runner.py
2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/tests/fixtures/test_isolated_cli_runner.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,54 +0,0 @@
-# coding: utf-8
-
-
-def test_fixture(testdir):
- testdir.makeconftest('''
- try:
- from mock import patch, Mock
- except ImportError:
- from unittest.mock import patch, Mock
-
- def pytest_configure(config):
- config.patched =
patch('pytest_click.fixtures.CliRunner.isolated_filesystem')
- config.patched.start()
-
- def pytest_unconfigure(config):
- config.patched.stop()
- ''')
- testdir.makepyfile('''
- from click.testing import CliRunner
-
- def test_fixture(isolated_cli_runner):
- assert isinstance(isolated_cli_runner, CliRunner)
- assert isolated_cli_runner.isolated_filesystem.called
- ''')
- result = testdir.runpytest('--verbose')
- result.stdout.fnmatch_lines('test_fixture.py::test_fixture PASSED*')
-
-
-def test_real_invocation(testdir):
- testdir.makepyfile('''
- import click
-
- def test_fixture(isolated_cli_runner):
-
- @click.command()
- @click.argument('f', type=click.File())
- def cat(f):
- click.echo(f.read())
-
- with open('hello.txt', 'w') as f:
- f.write('Hello World!')
-
- result = isolated_cli_runner.invoke(cat, ['hello.txt'])
- assert result.exit_code == 0
- assert result.output == 'Hello World!\\n'
- ''')
- result = testdir.runpytest('--verbose')
- result.stdout.fnmatch_lines('test_real_invocation.py::test_fixture
PASSED*')
-
-
-def test_docstring(testdir):
- result = testdir.runpytest('--fixtures')
- assert ' Instance of `click.testing.CliRunner` with ' \
- 'automagically `isolated_filesystem()` called.' in
result.stdout.lines
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/tests/test_plugin.py
new/pytest-click-1.0.2/tests/test_plugin.py
--- old/pytest-click-0.3/tests/test_plugin.py 2019-01-05 20:36:55.000000000
+0100
+++ new/pytest-click-1.0.2/tests/test_plugin.py 1970-01-01 01:00:00.000000000
+0100
@@ -1,7 +0,0 @@
-# coding: utf-8
-
-
-def test_markers(testdir):
- result = testdir.runpytest('--markers')
- assert '@pytest.mark.runner_setup(**kwargs): ' \
- 'Pass kwargs to `click.testing.CliRunner` initialization.' in
result.stdout.lines
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-click-0.3/tox.ini
new/pytest-click-1.0.2/tox.ini
--- old/pytest-click-0.3/tox.ini 2019-01-05 20:36:55.000000000 +0100
+++ new/pytest-click-1.0.2/tox.ini 2020-08-29 12:20:26.000000000 +0200
@@ -1,6 +1,6 @@
[tox]
-envlist = py27, py34, py35, py36, py37, pypy
-skipsdist = True
+isolated_build = true
+envlist = py{35,36,37,38,39,py3}, coverage-report
[testenv]
setenv =
@@ -9,8 +9,22 @@
LANG=en_US.utf-8
deps =
pytest
- pytest-cov
+ coverage
click
- py27,pypy: mock
-usedevelop = True
-commands = pytest --cov pytest_click --cov-report xml {posargs:tests} -x
+commands =
+ coverage run --source=pytest_click -m pytest {posargs:test}
+
+[testenv:coverage-report]
+description = Report coverage over all measured test runs.
+basepython = python3.7
+deps = coverage
+skip_install = true
+depends = py{35,36,37,38,39}
+commands =
+ coverage combine
+ coverage report
+ coverage xml -i {posargs:}
+
+[testenv:build]
+deps = pep517
+commands = python -m pep517.build --source . --binary --out-dir dist/