Skip to content

Commit 01df368

Browse files
Merge pull request #3914 from nicoddemus/merge-master-into-features
Merge master into features
2 parents 64f0068 + 2256f2f commit 01df368

32 files changed

+300
-101
lines changed

.coveragerc

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[run]
2-
omit =
3-
# standlonetemplate is read dynamically and tested by test_genscript
4-
*standalonetemplate.py
2+
source = _pytest,testing
3+
parallel = 1

.travis.yml

+52-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
sudo: false
22
language: python
33
stages:
4-
- linting
5-
- test
4+
- baseline
5+
- name: test
6+
if: repo = pytest-dev/pytest AND tag IS NOT present
67
- name: deploy
78
if: repo = pytest-dev/pytest AND tag IS present
89
python:
@@ -11,13 +12,8 @@ install:
1112
- pip install --upgrade --pre tox
1213
env:
1314
matrix:
14-
# coveralls is not listed in tox's envlist, but should run in travis
15-
- TOXENV=coveralls
1615
# note: please use "tox --listenvs" to populate the build matrix below
1716
# please remove the linting env in all cases
18-
- TOXENV=py27
19-
- TOXENV=py34
20-
- TOXENV=py36
2117
- TOXENV=py27-pexpect
2218
- TOXENV=py27-xdist
2319
- TOXENV=py27-trial
@@ -30,20 +26,42 @@ env:
3026
- TOXENV=py36-pluggymaster
3127
- TOXENV=py27-nobyte
3228
- TOXENV=doctesting
33-
- TOXENV=docs
29+
- TOXENV=docs PYTEST_NO_COVERAGE=1
3430

3531
jobs:
3632
include:
37-
- env: TOXENV=pypy
33+
# Coverage tracking is slow with pypy, skip it.
34+
- env: TOXENV=pypy PYTEST_NO_COVERAGE=1
3835
python: 'pypy-5.4'
3936
- env: TOXENV=py35
4037
python: '3.5'
41-
- env: TOXENV=py36-freeze
38+
- env: TOXENV=py36-freeze PYTEST_NO_COVERAGE=1
4239
python: '3.6'
4340
- env: TOXENV=py37
4441
python: '3.7'
4542
sudo: required
4643
dist: xenial
44+
- &test-macos
45+
language: generic
46+
os: osx
47+
osx_image: xcode9.4
48+
sudo: required
49+
install:
50+
- python -m pip install --pre tox
51+
env: TOXENV=py27
52+
- <<: *test-macos
53+
env: TOXENV=py37
54+
before_install:
55+
- brew update
56+
- brew upgrade python
57+
- brew unlink python
58+
- brew link python
59+
60+
- stage: baseline
61+
env: TOXENV=py27
62+
- env: TOXENV=py34
63+
- env: TOXENV=py36
64+
- env: TOXENV=linting PYTEST_NO_COVERAGE=1
4765

4866
- stage: deploy
4967
python: '3.6'
@@ -60,12 +78,33 @@ jobs:
6078
on:
6179
tags: true
6280
repo: pytest-dev/pytest
63-
- stage: linting
64-
python: '3.6'
65-
env: TOXENV=linting
81+
82+
before_script:
83+
- |
84+
if [[ "$PYTEST_NO_COVERAGE" != 1 ]]; then
85+
export _PYTEST_TOX_COVERAGE_RUN="env COVERAGE_FILE=$PWD/.coverage COVERAGE_PROCESS_START=$PWD/.coveragerc coverage run --source {envsitepackagesdir}/_pytest/,$PWD/testing -m"
86+
export _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
87+
fi
6688
6789
script: tox --recreate
6890

91+
after_success:
92+
- |
93+
if [[ "$PYTEST_NO_COVERAGE" != 1 ]]; then
94+
set -e
95+
pip install codecov
96+
coverage combine
97+
coverage xml
98+
coverage report -m
99+
codecov --required -X gcov pycov search -f coverage.xml --flags ${TOXENV//-/ }
100+
101+
# Coveralls does not support merged reports.
102+
if [[ "$TOXENV" = py37 ]]; then
103+
pip install coveralls
104+
coveralls
105+
fi
106+
fi
107+
69108
notifications:
70109
irc:
71110
channels:

CHANGELOG.rst

+25
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,31 @@ with advance notice in the **Deprecations** section of releases.
1818
1919
.. towncrier release notes start
2020
21+
pytest 3.7.4 (2018-08-29)
22+
=========================
23+
24+
Bug Fixes
25+
---------
26+
27+
- `#3506 <https://github.com/pytest-dev/pytest/issues/3506>`_: Fix possible infinite recursion when writing ``.pyc`` files.
28+
29+
30+
- `#3853 <https://github.com/pytest-dev/pytest/issues/3853>`_: Cache plugin now obeys the ``-q`` flag when ``--last-failed`` and ``--failed-first`` flags are used.
31+
32+
33+
- `#3883 <https://github.com/pytest-dev/pytest/issues/3883>`_: Fix bad console output when using ``console_output_style=classic``.
34+
35+
36+
- `#3888 <https://github.com/pytest-dev/pytest/issues/3888>`_: Fix macOS specific code using ``capturemanager`` plugin in doctests.
37+
38+
39+
40+
Improved Documentation
41+
----------------------
42+
43+
- `#3902 <https://github.com/pytest-dev/pytest/issues/3902>`_: Fix pytest.org links
44+
45+
2146
pytest 3.7.3 (2018-08-26)
2247
=========================
2348

HOWTORELEASE.rst

+3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ taking a lot of time to make a new one.
2828

2929
#. After all tests pass and the PR has been approved, publish to PyPI by pushing the tag::
3030

31+
git tag <VERSION>
3132
git push [email protected]:pytest-dev/pytest.git <VERSION>
3233

3334
Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/pytest>`_.
3435

36+
#. Merge the PR into ``master``.
37+
3538
#. Send an email announcement with the contents from::
3639

3740
doc/en/announce/release-<VERSION>.rst

README.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
.. image:: http://docs.pytest.org/en/latest/_static/pytest1.png
2-
:target: http://docs.pytest.org
1+
.. image:: https://docs.pytest.org/en/latest/_static/pytest1.png
2+
:target: https://docs.pytest.org/en/latest/
33
:align: center
44
:alt: pytest
55

@@ -66,23 +66,23 @@ To execute it::
6666
========================== 1 failed in 0.04 seconds ===========================
6767

6868

69-
Due to ``pytest``'s detailed assertion introspection, only plain ``assert`` statements are used. See `getting-started <http://docs.pytest.org/en/latest/getting-started.html#our-first-test-run>`_ for more examples.
69+
Due to ``pytest``'s detailed assertion introspection, only plain ``assert`` statements are used. See `getting-started <https://docs.pytest.org/en/latest/getting-started.html#our-first-test-run>`_ for more examples.
7070

7171

7272
Features
7373
--------
7474

75-
- Detailed info on failing `assert statements <http://docs.pytest.org/en/latest/assert.html>`_ (no need to remember ``self.assert*`` names);
75+
- Detailed info on failing `assert statements <https://docs.pytest.org/en/latest/assert.html>`_ (no need to remember ``self.assert*`` names);
7676

7777
- `Auto-discovery
78-
<http://docs.pytest.org/en/latest/goodpractices.html#python-test-discovery>`_
78+
<https://docs.pytest.org/en/latest/goodpractices.html#python-test-discovery>`_
7979
of test modules and functions;
8080

81-
- `Modular fixtures <http://docs.pytest.org/en/latest/fixture.html>`_ for
81+
- `Modular fixtures <https://docs.pytest.org/en/latest/fixture.html>`_ for
8282
managing small or parametrized long-lived test resources;
8383

84-
- Can run `unittest <http://docs.pytest.org/en/latest/unittest.html>`_ (or trial),
85-
`nose <http://docs.pytest.org/en/latest/nose.html>`_ test suites out of the box;
84+
- Can run `unittest <https://docs.pytest.org/en/latest/unittest.html>`_ (or trial),
85+
`nose <https://docs.pytest.org/en/latest/nose.html>`_ test suites out of the box;
8686

8787
- Python 2.7, Python 3.4+, PyPy 2.3, Jython 2.5 (untested);
8888

@@ -92,7 +92,7 @@ Features
9292
Documentation
9393
-------------
9494

95-
For full documentation, including installation, tutorials and PDF documents, please see http://docs.pytest.org.
95+
For full documentation, including installation, tutorials and PDF documents, please see https://docs.pytest.org/en/latest/.
9696

9797

9898
Bugs/Requests
@@ -104,7 +104,7 @@ Please use the `GitHub issue tracker <https://github.com/pytest-dev/pytest/issue
104104
Changelog
105105
---------
106106

107-
Consult the `Changelog <http://docs.pytest.org/en/latest/changelog.html>`__ page for fixes and enhancements of each version.
107+
Consult the `Changelog <https://docs.pytest.org/en/latest/changelog.html>`__ page for fixes and enhancements of each version.
108108

109109

110110
License

changelog/3907.doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Corrected type of the exceptions collection passed to ``xfail``: ``raises`` argument accepts a ``tuple`` instead of ``list``.

doc/en/announce/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Release announcements
66
:maxdepth: 2
77

88

9+
release-3.7.4
910
release-3.7.3
1011
release-3.7.2
1112
release-3.7.1

doc/en/announce/release-3.7.4.rst

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
pytest-3.7.4
2+
=======================================
3+
4+
pytest 3.7.4 has just been released to PyPI.
5+
6+
This is a bug-fix release, being a drop-in replacement. To upgrade::
7+
8+
pip install --upgrade pytest
9+
10+
The full changelog is available at https://docs.pytest.org/en/latest/changelog.html.
11+
12+
Thanks to all who contributed to this release, among them:
13+
14+
* Anthony Sottile
15+
* Bruno Oliveira
16+
* Daniel Hahler
17+
* Jiri Kuncar
18+
* Steve Piercy
19+
20+
21+
Happy testing,
22+
The pytest Development Team

doc/en/example/markers.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -200,17 +200,17 @@ You can ask which markers exist for your test suite - the list includes our just
200200
$ pytest --markers
201201
@pytest.mark.webtest: mark a test as a webtest.
202202

203-
@pytest.mark.filterwarnings(warning): add a warning filter to the given test. see http://pytest.org/latest/warnings.html#pytest-mark-filterwarnings
203+
@pytest.mark.filterwarnings(warning): add a warning filter to the given test. see https://docs.pytest.org/en/latest/warnings.html#pytest-mark-filterwarnings
204204

205205
@pytest.mark.skip(reason=None): skip the given test function with an optional reason. Example: skip(reason="no way of currently testing this") skips the test.
206206

207-
@pytest.mark.skipif(condition): skip the given test function if eval(condition) results in a True value. Evaluation happens within the module global context. Example: skipif('sys.platform == "win32"') skips the test if we are on the win32 platform. see http://pytest.org/latest/skipping.html
207+
@pytest.mark.skipif(condition): skip the given test function if eval(condition) results in a True value. Evaluation happens within the module global context. Example: skipif('sys.platform == "win32"') skips the test if we are on the win32 platform. see https://docs.pytest.org/en/latest/skipping.html
208208

209-
@pytest.mark.xfail(condition, reason=None, run=True, raises=None, strict=False): mark the test function as an expected failure if eval(condition) has a True value. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. If only specific exception(s) are expected, you can list them in raises, and if the test fails in other ways, it will be reported as a true failure. See http://pytest.org/latest/skipping.html
209+
@pytest.mark.xfail(condition, reason=None, run=True, raises=None, strict=False): mark the test function as an expected failure if eval(condition) has a True value. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. If only specific exception(s) are expected, you can list them in raises, and if the test fails in other ways, it will be reported as a true failure. See https://docs.pytest.org/en/latest/skipping.html
210210

211-
@pytest.mark.parametrize(argnames, argvalues): call a test function multiple times passing in different arguments in turn. argvalues generally needs to be a list of values if argnames specifies only one name or a list of tuples of values if argnames specifies multiple names. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.see http://pytest.org/latest/parametrize.html for more info and examples.
211+
@pytest.mark.parametrize(argnames, argvalues): call a test function multiple times passing in different arguments in turn. argvalues generally needs to be a list of values if argnames specifies only one name or a list of tuples of values if argnames specifies multiple names. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.see https://docs.pytest.org/en/latest/parametrize.html for more info and examples.
212212

213-
@pytest.mark.usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures. see http://pytest.org/latest/fixture.html#usefixtures
213+
@pytest.mark.usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures. see https://docs.pytest.org/en/latest/fixture.html#usefixtures
214214

215215
@pytest.mark.tryfirst: mark a hook implementation function such that the plugin machinery will try to call it first/as early as possible.
216216

@@ -376,17 +376,17 @@ The ``--markers`` option always gives you a list of available markers::
376376
$ pytest --markers
377377
@pytest.mark.env(name): mark test to run only on named environment
378378

379-
@pytest.mark.filterwarnings(warning): add a warning filter to the given test. see http://pytest.org/latest/warnings.html#pytest-mark-filterwarnings
379+
@pytest.mark.filterwarnings(warning): add a warning filter to the given test. see https://docs.pytest.org/en/latest/warnings.html#pytest-mark-filterwarnings
380380

381381
@pytest.mark.skip(reason=None): skip the given test function with an optional reason. Example: skip(reason="no way of currently testing this") skips the test.
382382

383-
@pytest.mark.skipif(condition): skip the given test function if eval(condition) results in a True value. Evaluation happens within the module global context. Example: skipif('sys.platform == "win32"') skips the test if we are on the win32 platform. see http://pytest.org/latest/skipping.html
383+
@pytest.mark.skipif(condition): skip the given test function if eval(condition) results in a True value. Evaluation happens within the module global context. Example: skipif('sys.platform == "win32"') skips the test if we are on the win32 platform. see https://docs.pytest.org/en/latest/skipping.html
384384

385-
@pytest.mark.xfail(condition, reason=None, run=True, raises=None, strict=False): mark the test function as an expected failure if eval(condition) has a True value. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. If only specific exception(s) are expected, you can list them in raises, and if the test fails in other ways, it will be reported as a true failure. See http://pytest.org/latest/skipping.html
385+
@pytest.mark.xfail(condition, reason=None, run=True, raises=None, strict=False): mark the test function as an expected failure if eval(condition) has a True value. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. If only specific exception(s) are expected, you can list them in raises, and if the test fails in other ways, it will be reported as a true failure. See https://docs.pytest.org/en/latest/skipping.html
386386

387-
@pytest.mark.parametrize(argnames, argvalues): call a test function multiple times passing in different arguments in turn. argvalues generally needs to be a list of values if argnames specifies only one name or a list of tuples of values if argnames specifies multiple names. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.see http://pytest.org/latest/parametrize.html for more info and examples.
387+
@pytest.mark.parametrize(argnames, argvalues): call a test function multiple times passing in different arguments in turn. argvalues generally needs to be a list of values if argnames specifies only one name or a list of tuples of values if argnames specifies multiple names. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.see https://docs.pytest.org/en/latest/parametrize.html for more info and examples.
388388

389-
@pytest.mark.usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures. see http://pytest.org/latest/fixture.html#usefixtures
389+
@pytest.mark.usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures. see https://docs.pytest.org/en/latest/fixture.html#usefixtures
390390

391391
@pytest.mark.tryfirst: mark a hook implementation function such that the plugin machinery will try to call it first/as early as possible.
392392

doc/en/example/reportingdemo.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -617,5 +617,5 @@ get on the terminal - we are working on that)::
617617
Metafunc.addcall is deprecated and scheduled to be removed in pytest 4.0.
618618
Please use Metafunc.parametrize instead.
619619

620-
-- Docs: http://doc.pytest.org/en/latest/warnings.html
620+
-- Docs: https://docs.pytest.org/en/latest/warnings.html
621621
================== 42 failed, 1 warnings in 0.12 seconds ===================

doc/en/funcarg_compare.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pytest-2.3: reasoning for fixture/funcarg evolution
77

88
**Target audience**: Reading this document requires basic knowledge of
99
python testing, xUnit setup methods and the (previous) basic pytest
10-
funcarg mechanism, see http://pytest.org/2.2.4/funcargs.html
10+
funcarg mechanism, see https://docs.pytest.org/en/latest/historical-notes.html#funcargs-and-pytest-funcarg.
1111
If you are new to pytest, then you can simply ignore this
1212
section and read the other sections.
1313

doc/en/skipping.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ on a particular platform::
277277
~~~~~~~~~~~~~~~~~~~~
278278

279279
If you want to be more specific as to why the test is failing, you can specify
280-
a single exception, or a list of exceptions, in the ``raises`` argument.
280+
a single exception, or a tuple of exceptions, in the ``raises`` argument.
281281

282282
.. code-block:: python
283283

doc/en/warnings.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Running pytest now produces this output::
3333
$REGENDOC_TMPDIR/test_show_warnings.py:4: UserWarning: api v1, should use functions from v2
3434
warnings.warn(UserWarning("api v1, should use functions from v2"))
3535

36-
-- Docs: http://doc.pytest.org/en/latest/warnings.html
36+
-- Docs: https://docs.pytest.org/en/latest/warnings.html
3737
=================== 1 passed, 1 warnings in 0.12 seconds ===================
3838

3939
Pytest by default catches all warnings except for ``DeprecationWarning`` and ``PendingDeprecationWarning``.

doc/en/writing_plugins.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ additionally it is possible to copy examples for a example folder before running
422422
$REGENDOC_TMPDIR/test_example.py:4: PytestExerimentalApiWarning: testdir.copy_example is an experimental api that may change over time
423423
testdir.copy_example("test_example.py")
424424
425-
-- Docs: http://doc.pytest.org/en/latest/warnings.html
425+
-- Docs: https://docs.pytest.org/en/latest/warnings.html
426426
=================== 2 passed, 1 warnings in 0.12 seconds ===================
427427
428428
For more information about the result object that ``runpytest()`` returns, and

scripts/release.minor.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ against itself, passing on many different interpreters and platforms.
99
This release contains a number of bugs fixes and improvements, so users are encouraged
1010
to take a look at the CHANGELOG:
1111

12-
http://doc.pytest.org/en/latest/changelog.html
12+
https://docs.pytest.org/en/latest/changelog.html
1313

1414
For complete documentation, please visit:
1515

16-
http://docs.pytest.org
16+
https://docs.pytest.org/en/latest/
1717

1818
As usual, you can upgrade from pypi via:
1919

scripts/release.patch.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is a bug-fix release, being a drop-in replacement. To upgrade::
77

88
pip install --upgrade pytest
99

10-
The full changelog is available at http://doc.pytest.org/en/latest/changelog.html.
10+
The full changelog is available at https://docs.pytest.org/en/latest/changelog.html.
1111

1212
Thanks to all who contributed to this release, among them:
1313

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def main():
9292
description="pytest: simple powerful testing with Python",
9393
long_description=long_description,
9494
use_scm_version={"write_to": "src/_pytest/_version.py"},
95-
url="http://pytest.org",
95+
url="https://docs.pytest.org/en/latest/",
9696
project_urls={
9797
"Source": "https://github.com/pytest-dev/pytest",
9898
"Tracker": "https://github.com/pytest-dev/pytest/issues",

0 commit comments

Comments
 (0)