Skip to content

Release 4.0.0 #4388

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 26 commits into from
Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5eb4016
Merge pull request #4301 from nicoddemus/merge-master-into-features
RonnyPfannschmidt Nov 4, 2018
f521f5e
move the _bestrelpathcache to session
RonnyPfannschmidt Nov 5, 2018
1752c7e
Merge pull request #4314 from RonnyPfannschmidt/bestrelpath-cache-mov…
nicoddemus Nov 5, 2018
cb57159
Handle os.chdir() during collection
blueyed Nov 5, 2018
4c00552
Merge pull request #4317 from blueyed/cwd
blueyed Nov 7, 2018
9d838fa
Merge branch 'master' into features
blueyed Nov 8, 2018
5dd509c
Merge pull request #4338 from blueyed/merge-master
blueyed Nov 8, 2018
3137c89
Fix/improve handling of chdir with no-args and testpaths
blueyed Nov 7, 2018
6c06057
Merge pull request #4336 from blueyed/cwd2
blueyed Nov 8, 2018
a507f44
cache_dir: use $TOX_ENV_DIR/ prefix if set
blueyed Oct 30, 2018
b92530d
Merge pull request #4271 from blueyed/pytest_cache
blueyed Nov 9, 2018
1b260a8
Merge branch 'master' into features
blueyed Nov 9, 2018
10d27f4
Merge pull request #4360 from blueyed/merge-master
RonnyPfannschmidt Nov 9, 2018
ac8b9c6
Node: do not add "::()" to nodeid
blueyed Nov 9, 2018
87254ca
Add test for --deselect without "::()"
blueyed Nov 9, 2018
f551cb9
Skip Instances with --collect-only
blueyed Nov 9, 2018
b131214
Merge pull request #4358 from blueyed/instance
blueyed Nov 10, 2018
dc20ded
Change RemovedInPytest4Warnings to errors by default
nicoddemus Nov 8, 2018
f8f22d2
Use a custom cache directory for test_stepwise tests
nicoddemus Nov 12, 2018
a6a9646
pytester: pop TOX_ENV_DIR from os.environ
blueyed Nov 13, 2018
8198e7c
Merge pull request #4349 from nicoddemus/pytest4-warnings-as-errors
nicoddemus Nov 13, 2018
557cb6c
Merge remote-tracking branch 'upstream/master' into merge-master-into…
nicoddemus Nov 13, 2018
a72eff5
Merge pull request #4382 from blueyed/pytester-pop-TOX_ENV_DIR
blueyed Nov 13, 2018
fea09cd
Merge pull request #4383 from nicoddemus/merge-master-into-features
nicoddemus Nov 13, 2018
e025974
Merge remote-tracking branch 'upstream/master' into release-4.0.0
nicoddemus Nov 13, 2018
c2d6b35
Preparing release version 4.0.0
nicoddemus Nov 13, 2018
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
67 changes: 67 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,73 @@ with advance notice in the **Deprecations** section of releases.

.. towncrier release notes start

pytest 4.0.0 (2018-11-13)
=========================

Removals
--------

- `#3737 <https://github.com/pytest-dev/pytest/issues/3737>`_: **RemovedInPytest4Warnings are now errors by default.**

Following our plan to remove deprecated features with as little disruption as
possible, all warnings of type ``RemovedInPytest4Warnings`` now generate errors
instead of warning messages.

**The affected features will be effectively removed in pytest 4.1**, so please consult the
`Deprecations and Removals <https://docs.pytest.org/en/latest/deprecations.html>`__
section in the docs for directions on how to update existing code.

In the pytest ``4.0.X`` series, it is possible to change the errors back into warnings as a stop
gap measure by adding this to your ``pytest.ini`` file:

.. code-block:: ini

[pytest]
filterwarnings =
ignore::pytest.RemovedInPytest4Warning

But this will stop working when pytest ``4.1`` is released.

**If you have concerns** about the removal of a specific feature, please add a
comment to `#4348 <https://github.com/pytest-dev/pytest/issues/4348>`__.


- `#4358 <https://github.com/pytest-dev/pytest/issues/4358>`_: Remove the ``::()`` notation to denote a test class instance in node ids.

Previously, node ids that contain test instances would use ``::()`` to denote the instance like this::

test_foo.py::Test::()::test_bar

The extra ``::()`` was puzzling to most users and has been removed, so that the test id becomes now::

test_foo.py::Test::test_bar

This change could not accompany a deprecation period as is usual when user-facing functionality changes because
it was not really possible to detect when the functionality was being used explicitly.

The extra ``::()`` might have been removed in some places internally already,
which then led to confusion in places where it was expected, e.g. with
``--deselect`` (`#4127 <https://github.com/pytest-dev/pytest/issues/4127>`_).

Test class instances are also not listed with ``--collect-only`` anymore.



Features
--------

- `#4270 <https://github.com/pytest-dev/pytest/issues/4270>`_: The ``cache_dir`` option uses ``$TOX_ENV_DIR`` as prefix (if set in the environment).

This uses a different cache per tox environment by default.



Bug Fixes
---------

- `#3554 <https://github.com/pytest-dev/pytest/issues/3554>`_: Fix ``CallInfo.__repr__`` for when the call is not finished yet.


pytest 3.10.1 (2018-11-11)
==========================

Expand Down
1 change: 0 additions & 1 deletion changelog/3554.bugfix.rst

This file was deleted.

1 change: 1 addition & 0 deletions doc/en/announce/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Release announcements
:maxdepth: 2


release-4.0.0
release-3.10.1
release-3.10.0
release-3.9.3
Expand Down
30 changes: 30 additions & 0 deletions doc/en/announce/release-4.0.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pytest-4.0.0
=======================================

The pytest team is proud to announce the 4.0.0 release!

pytest is a mature Python testing tool with more than a 2000 tests
against itself, passing on many different interpreters and platforms.

This release contains a number of bugs fixes and improvements, so users are encouraged
to take a look at the CHANGELOG:

https://docs.pytest.org/en/latest/changelog.html

For complete documentation, please visit:

https://docs.pytest.org/en/latest/

As usual, you can upgrade from pypi via:

pip install -U pytest

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

* Bruno Oliveira
* Daniel Hahler
* Ronny Pfannschmidt


Happy testing,
The Pytest Development Team
7 changes: 2 additions & 5 deletions doc/en/example/assertion/failure_demo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import six

import _pytest._code
import pytest
from pytest import raises


Expand All @@ -16,15 +17,11 @@ def otherfunc_multi(a, b):
assert a == b


@pytest.mark.parametrize("param1, param2", [(3, 6)])
def test_generative(param1, param2):
assert param1 * 2 < param2


def pytest_generate_tests(metafunc):
if "param1" in metafunc.fixturenames:
metafunc.addcall(funcargs=dict(param1=3, param2=6))


class TestFailing(object):
def test_simple(self):
def f():
Expand Down
1 change: 0 additions & 1 deletion doc/en/example/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ If you just collect tests you'll also nicely see 'advanced' and 'basic' as varia
collected 4 items
<Module 'test_scenarios.py'>
<Class 'TestSampleWithScenarios'>
<Instance '()'>
<Function 'test_demo1[basic]'>
<Function 'test_demo2[basic]'>
<Function 'test_demo1[advanced]'>
Expand Down
2 changes: 0 additions & 2 deletions doc/en/example/pythoncollection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ The test collection would look like this::
collected 2 items
<Module 'check_myapp.py'>
<Class 'CheckMyApp'>
<Instance '()'>
<Function 'simple_check'>
<Function 'complex_check'>

Expand Down Expand Up @@ -187,7 +186,6 @@ You can always peek at the collection tree without running tests like this::
<Module 'CWD/pythoncollection.py'>
<Function 'test_function'>
<Class 'TestClass'>
<Instance '()'>
<Function 'test_method'>
<Function 'test_anothermethod'>

Expand Down
Loading