Skip to content

Commit e03a19f

Browse files
Merge pull request #4021 from nicoddemus/merge-master-into-features
Merge master into features
2 parents 42afce2 + fcc5b6d commit e03a19f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+814
-136
lines changed

.coveragerc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
[run]
2-
source = _pytest,testing
2+
source = pytest,_pytest,testing/
33
parallel = 1
44
branch = 1
5+
6+
[paths]
7+
source = src/
8+
.tox/*/lib/python*/site-packages/
9+
.tox\*\Lib\site-packages\

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ src/_pytest/_version.py
2424
.eggs/
2525

2626
doc/*/_build
27+
doc/*/.doctrees
2728
build/
2829
dist/
2930
*.egg-info

.pre-commit-config.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ repos:
3838
language: python
3939
additional_dependencies: [pygments, restructuredtext_lint]
4040
- id: changelogs-rst
41-
name: changelog files must end in .rst
42-
entry: ./scripts/fail
43-
language: script
44-
files: 'changelog/.*(?<!\.rst)$'
41+
name: changelog filenames
42+
language: fail
43+
entry: 'changelog files must be named ####.(feature|bugfix|doc|removal|vendor|trivial).rst'
44+
exclude: changelog/(\d+\.(feature|bugfix|doc|deprecation|removal|vendor|trivial).rst|README.rst|_template.rst)
45+
files: ^changelog/

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ env:
1818
- TOXENV=py27-xdist
1919
- TOXENV=py27-trial
2020
- TOXENV=py27-numpy
21-
- TOXENV=py27-pluggymaster
21+
- TOXENV=py27-pluggymaster PYTEST_NO_COVERAGE=1
2222
- TOXENV=py36-pexpect
2323
- TOXENV=py36-xdist
2424
- TOXENV=py36-trial
2525
- TOXENV=py36-numpy
26-
- TOXENV=py36-pluggymaster
26+
- TOXENV=py36-pluggymaster PYTEST_NO_COVERAGE=1
2727
- TOXENV=py27-nobyte
2828
- TOXENV=doctesting
2929
- TOXENV=docs PYTEST_NO_COVERAGE=1
@@ -84,7 +84,7 @@ before_script:
8484
if [[ "$PYTEST_NO_COVERAGE" != 1 ]]; then
8585
export COVERAGE_FILE="$PWD/.coverage"
8686
export COVERAGE_PROCESS_START="$PWD/.coveragerc"
87-
export _PYTEST_TOX_COVERAGE_RUN="coverage run --source {envsitepackagesdir}/_pytest/,{toxinidir}/testing -m"
87+
export _PYTEST_TOX_COVERAGE_RUN="coverage run -m"
8888
export _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
8989
fi
9090
@@ -94,11 +94,11 @@ after_success:
9494
- |
9595
if [[ "$PYTEST_NO_COVERAGE" != 1 ]]; then
9696
set -e
97-
pip install codecov
97+
pip install coverage
9898
coverage combine
9999
coverage xml --ignore-errors
100100
coverage report -m --ignore-errors
101-
codecov --required -X gcov pycov search -f coverage.xml --flags ${TOXENV//-/ } linux
101+
bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -F "${TOXENV//-/,},linux"
102102
103103
# Coveralls does not support merged reports.
104104
if [[ "$TOXENV" = py37 ]]; then

CHANGELOG.rst

Lines changed: 53 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,61 @@ with advance notice in the **Deprecations** section of releases.
1818
1919
.. towncrier release notes start
2020
21-
pytest 3.8.0 (2018-09-05)
21+
pytest 3.8.1 (2018-09-22)
2222
=========================
2323

24-
Deprecations and Removals
25-
-------------------------
24+
Bug Fixes
25+
---------
26+
27+
- `#3286 <https://github.com/pytest-dev/pytest/issues/3286>`_: ``.pytest_cache`` directory is now automatically ignored by Git. Users who would like to contribute a solution for other SCMs please consult/comment on this issue.
28+
29+
30+
- `#3749 <https://github.com/pytest-dev/pytest/issues/3749>`_: Fix the following error during collection of tests inside packages::
31+
32+
TypeError: object of type 'Package' has no len()
33+
2634

27-
- `#2452 <https://github.com/pytest-dev/pytest/issues/2452>`_: ``Config.warn`` has been deprecated, it should be replaced by calls to the standard ``warnings.warn``.
35+
- `#3941 <https://github.com/pytest-dev/pytest/issues/3941>`_: Fix bug where indirect parametrization would consider the scope of all fixtures used by the test function to determine the parametrization scope, and not only the scope of the fixtures being parametrized.
2836

29-
``Node.warn`` now supports two signatures:
3037

31-
* ``node.warn(PytestWarning("some message"))``: is now the recommended way to call this function. The warning
32-
instance must be a ``PytestWarning`` or subclass instance.
38+
- `#3973 <https://github.com/pytest-dev/pytest/issues/3973>`_: Fix crash of the assertion rewriter if a test changed the current working directory without restoring it afterwards.
39+
40+
41+
- `#3998 <https://github.com/pytest-dev/pytest/issues/3998>`_: Fix issue that prevented some caplog properties (for example ``record_tuples``) from being available when entering the debugger with ``--pdb``.
42+
43+
44+
- `#3999 <https://github.com/pytest-dev/pytest/issues/3999>`_: Fix ``UnicodeDecodeError`` in python2.x when a class returns a non-ascii binary ``__repr__`` in an assertion which also contains non-ascii text.
45+
46+
47+
48+
Improved Documentation
49+
----------------------
3350

34-
* ``node.warn("CI", "some message")``: this code/message form is now deprecated and should be converted to
35-
the warning instance form above.
51+
- `#3996 <https://github.com/pytest-dev/pytest/issues/3996>`_: New `Deprecations and Removals <https://docs.pytest.org/en/latest/deprecations.html>`_ page shows all currently
52+
deprecated features, the rationale to do so, and alternatives to update your code. It also list features removed
53+
from pytest in past major releases to help those with ancient pytest versions to upgrade.
3654

37-
``RemovedInPytest4Warning`` and ``PytestExperimentalApiWarning`` are now part of the public API and should be accessed
38-
using ``pytest.RemovedInPytest4Warning`` and ``pytest.PytestExperimentalApiWarning``.
3955

4056

57+
Trivial/Internal Changes
58+
------------------------
59+
60+
- `#3955 <https://github.com/pytest-dev/pytest/issues/3955>`_: Improve pre-commit detection for changelog filenames
61+
62+
63+
- `#3975 <https://github.com/pytest-dev/pytest/issues/3975>`_: Remove legacy code around im_func as that was python2 only
64+
65+
66+
pytest 3.8.0 (2018-09-05)
67+
=========================
68+
69+
Deprecations and Removals
70+
-------------------------
71+
72+
- `#2452 <https://github.com/pytest-dev/pytest/issues/2452>`_: ``Config.warn`` and ``Node.warn`` have been
73+
deprecated, see `<https://docs.pytest.org/en/latest/deprecations.html#config-warn-and-node-warn>`_ for rationale and
74+
examples.
75+
4176
- `#3936 <https://github.com/pytest-dev/pytest/issues/3936>`_: ``@pytest.mark.filterwarnings`` second parameter is no longer regex-escaped,
4277
making it possible to actually use regular expressions to check the warning message.
4378

@@ -63,7 +98,10 @@ Features
6398
more info.
6499

65100

66-
- `#3784 <https://github.com/pytest-dev/pytest/issues/3784>`_: Add option to disable plugin auto-loading.
101+
- `#3251 <https://github.com/pytest-dev/pytest/issues/3251>`_: Warnings are now captured and displayed during test collection.
102+
103+
104+
- `#3784 <https://github.com/pytest-dev/pytest/issues/3784>`_: ``PYTEST_DISABLE_PLUGIN_AUTOLOAD`` environment variable disables plugin auto-loading when set.
67105

68106

69107
- `#3829 <https://github.com/pytest-dev/pytest/issues/3829>`_: Added the ``count`` option to ``console_output_style`` to enable displaying the progress as a count instead of a percentage.
@@ -250,15 +288,10 @@ pytest 3.7.0 (2018-07-30)
250288
Deprecations and Removals
251289
-------------------------
252290

253-
- `#2639 <https://github.com/pytest-dev/pytest/issues/2639>`_: ``pytest_namespace`` has been deprecated.
254-
255-
See the documentation for ``pytest_namespace`` hook for suggestions on how to deal
256-
with this in plugins which use this functionality.
257-
291+
- `#2639 <https://github.com/pytest-dev/pytest/issues/2639>`_: ``pytest_namespace`` has been `deprecated <https://docs.pytest.org/en/latest/deprecations.html#pytest-namespace>`_.
258292

259-
- `#3661 <https://github.com/pytest-dev/pytest/issues/3661>`_: Calling a fixture function directly, as opposed to request them in a test function, now issues a ``RemovedInPytest4Warning``. It will be changed into an error in pytest ``4.0``.
260293

261-
This is a great source of confusion to new users, which will often call the fixture functions and request them from test functions interchangeably, which breaks the fixture resolution model.
294+
- `#3661 <https://github.com/pytest-dev/pytest/issues/3661>`_: Calling a fixture function directly, as opposed to request them in a test function, now issues a ``RemovedInPytest4Warning``. See `the documentation for rationale and examples <https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly>`_.
262295

263296

264297

@@ -620,7 +653,7 @@ Deprecations and Removals
620653
<https://github.com/pytest-dev/pytest/issues/2770>`_)
621654

622655
- Defining ``pytest_plugins`` is now deprecated in non-top-level conftest.py
623-
files, because they "leak" to the entire directory tree. (`#3084
656+
files, because they "leak" to the entire directory tree. `See the docs <https://docs.pytest.org/en/latest/deprecations.html#pytest-plugins-in-non-top-level-conftest-files>`_ for the rationale behind this decision (`#3084
624657
<https://github.com/pytest-dev/pytest/issues/3084>`_)
625658

626659

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ environment:
1313
- TOXENV: "py27-trial"
1414
- TOXENV: "py27-numpy"
1515
- TOXENV: "py27-pluggymaster"
16+
PYTEST_NO_COVERAGE: "1"
1617
- TOXENV: "py36-xdist"
1718
- TOXENV: "py36-trial"
1819
- TOXENV: "py36-numpy"
1920
- TOXENV: "py36-pluggymaster"
21+
PYTEST_NO_COVERAGE: "1"
2022
- TOXENV: "py27-nobyte"
2123
- TOXENV: "doctesting"
2224
- TOXENV: "py36-freeze"

changelog/3251.feture.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

doc/en/announce/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Release announcements
66
:maxdepth: 2
77

88

9+
release-3.8.1
910
release-3.8.0
1011
release-3.7.4
1112
release-3.7.3

doc/en/announce/release-3.8.1.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
pytest-3.8.1
2+
=======================================
3+
4+
pytest 3.8.1 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+
* Ankit Goel
15+
* Anthony Sottile
16+
* Bruno Oliveira
17+
* Daniel Hahler
18+
* Maximilian Albert
19+
* Ronny Pfannschmidt
20+
* William Jamir Silva
21+
* wim glenn
22+
23+
24+
Happy testing,
25+
The pytest Development Team

0 commit comments

Comments
 (0)