Skip to content

Release 3.6.0 #3445

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

Closed
wants to merge 7 commits into from
Closed
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
61 changes: 61 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,67 @@

.. towncrier release notes start

Pytest 3.6.0 (2018-05-03)
=========================

Features
--------

- Now when ``@pytest.fixture`` is applied more than once to the same function a
``ValueError`` is raised. This buggy behavior would cause surprising problems
and if was working for a test suite it was mostly by accident. (`#2334
<https://github.com/pytest-dev/pytest/issues/2334>`_)

- Support for Python 3.7's builtin ``breakpoint()`` method, see `Using the
builtin breakpoint function
<https://docs.pytest.org/en/latest/usage.html#breakpoint-builtin>`_ for
details. (`#3180 <https://github.com/pytest-dev/pytest/issues/3180>`_)

- ``monkeypatch`` now supports a ``context()`` function which acts as a context
manager which undoes all patching done within the ``with`` block. (`#3290
<https://github.com/pytest-dev/pytest/issues/3290>`_)

- The ``--pdb`` option now causes KeyboardInterrupt to enter the debugger,
instead of stopping the test session. On python 2.7, hitting CTRL+C again
exits the debugger. On python 3.2 and higher, use CTRL+D. (`#3299
<https://github.com/pytest-dev/pytest/issues/3299>`_)

- pytest not longer changes the log level of the root logger when the
``log-level`` parameter has greater numeric value than that of the level of
the root logger, which makes it play better with custom logging configuration
in user code. (`#3307 <https://github.com/pytest-dev/pytest/issues/3307>`_)

- Revamp the internals of the ``pytest.mark`` implementation with correct per
node handling and introduce a new ``Node.iter_markers`` API for mark
iteration over nodes which fixes a number of long standing bugs caused by the
old approach. More details can be found in `the marks documentation
<https://docs.pytest.org/en/latest/mark.html#marker-revamp-and-iteration>`_.
(`#3317 <https://github.com/pytest-dev/pytest/issues/3317>`_)


Bug Fixes
---------

- A rare race-condition which might result in corrupted ``.pyc`` files on
Windows has been hopefully solved. (`#3008
<https://github.com/pytest-dev/pytest/issues/3008>`_)

- Also use iter_marker for discovering the marks applying for marker
expressions from the cli to avoid the bad data from the legacy mark storage.
(`#3441 <https://github.com/pytest-dev/pytest/issues/3441>`_)


Trivial/Internal Changes
------------------------

- ``pytest`` now depends on the `python-atomicwrites
<https://github.com/untitaker/python-atomicwrites>`_ library. (`#3008
<https://github.com/pytest-dev/pytest/issues/3008>`_)

- Update all pypi.python.org URLs to pypi.org. (`#3431
<https://github.com/pytest-dev/pytest/issues/3431>`_)


Pytest 3.5.1 (2018-04-23)
=========================

Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
------

.. image:: https://img.shields.io/pypi/v/pytest.svg
:target: https://pypi.python.org/pypi/pytest
:target: https://pypi.org/project/pytest/

.. image:: https://anaconda.org/conda-forge/pytest/badges/version.svg
.. image:: https://img.shields.io/conda/vn/conda-forge/pytest.svg
:target: https://anaconda.org/conda-forge/pytest

.. image:: https://img.shields.io/pypi/pyversions/pytest.svg
:target: https://pypi.python.org/pypi/pytest
:target: https://pypi.org/project/pytest/

.. image:: https://img.shields.io/coveralls/pytest-dev/pytest/master.svg
:target: https://coveralls.io/r/pytest-dev/pytest
Expand Down
1 change: 0 additions & 1 deletion changelog/2334.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3008.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3008.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3180.feature.rst

This file was deleted.

2 changes: 0 additions & 2 deletions changelog/3290.feature

This file was deleted.

2 changes: 0 additions & 2 deletions changelog/3299.feature.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog/3307.feature.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog/3317.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3441.bugfix

This file was deleted.

2 changes: 1 addition & 1 deletion doc/en/_templates/links.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h3>Useful Links</h3>
<ul>
<li><a href="https://pypi.python.org/pypi/pytest">pytest @ PyPI</a></li>
<li><a href="https://pypi.org/project/pytest/">pytest @ PyPI</a></li>
<li><a href="https://github.com/pytest-dev/pytest/">pytest @ GitHub</a></li>
<li><a href="http://plugincompat.herokuapp.com/">3rd party plugins</a></li>
<li><a href="https://github.com/pytest-dev/pytest/issues">Issue Tracker</a></li>
Expand Down
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-3.6.0
release-3.5.1
release-3.5.0
release-3.4.2
Expand Down
2 changes: 1 addition & 1 deletion doc/en/announce/release-2.3.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ few interesting new plugins saw the light last month:

And several others like pytest-django saw maintenance releases.
For a more complete list, check out
https://pypi.python.org/pypi?%3Aaction=search&term=pytest&submit=search.
https://pypi.org/search/?q=pytest

For general information see:

Expand Down
4 changes: 2 additions & 2 deletions doc/en/announce/release-2.4.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ a full list of details. A few feature highlights:
called if the corresponding setup method succeeded.

- integrate tab-completion on command line options if you
have `argcomplete <http://pypi.python.org/pypi/argcomplete>`_
have `argcomplete <https://pypi.org/project/argcomplete/>`_
configured.

- allow boolean expression directly with skipif/xfail
if a "reason" is also specified.

- a new hook ``pytest_load_initial_conftests`` allows plugins like
`pytest-django <http://pypi.python.org/pypi/pytest-django>`_ to
`pytest-django <https://pypi.org/project/pytest-django/>`_ to
influence the environment before conftest files import ``django``.

- reporting: color the last line red or green depending if
Expand Down
36 changes: 36 additions & 0 deletions doc/en/announce/release-3.6.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
pytest-3.6.0
=======================================

The pytest team is proud to announce the 3.6.0 release!

pytest is a mature Python testing tool with more than a 1600 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:

http://doc.pytest.org/en/latest/changelog.html

For complete documentation, please visit:

http://docs.pytest.org

As usual, you can upgrade from pypi via:

pip install -U pytest

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

* Anthony Shaw
* ApaDoctor
* Brian Maissy
* Bruno Oliveira
* Jon Dufresne
* Katerina Koukiou
* Rachel Kogan
* Ronny Pfannschmidt
* feuillemorte


Happy testing,
The Pytest Development Team
2 changes: 1 addition & 1 deletion doc/en/development_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Code Style
----------

* `PEP-8 <https://www.python.org/dev/peps/pep-0008>`_
* `flake8 <https://pypi.python.org/pypi/flake8>`_ for quality checks
* `flake8 <https://pypi.org/project/flake8/>`_ for quality checks
* `invoke <http://www.pyinvoke.org/>`_ to automate development tasks


Expand Down
2 changes: 1 addition & 1 deletion doc/en/example/nonpython.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A basic example for specifying tests in Yaml files
--------------------------------------------------------------

.. _`pytest-yamlwsgi`: http://bitbucket.org/aafshar/pytest-yamlwsgi/src/tip/pytest_yamlwsgi.py
.. _`PyYAML`: http://pypi.python.org/pypi/PyYAML/
.. _`PyYAML`: https://pypi.org/project/PyYAML/

Here is an example ``conftest.py`` (extracted from Ali Afshnars special purpose `pytest-yamlwsgi`_ plugin). This ``conftest.py`` will collect ``test*.yml`` files and will execute the yaml-formatted content as custom tests:

Expand Down
2 changes: 1 addition & 1 deletion doc/en/example/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ together with the actual data, instead of listing them separately.
A quick port of "testscenarios"
------------------------------------

.. _`test scenarios`: http://pypi.python.org/pypi/testscenarios/
.. _`test scenarios`: https://pypi.org/project/testscenarios/

Here is a quick port to run tests configured with `test scenarios`_,
an add-on from Robert Collins for the standard unittest framework. We
Expand Down
4 changes: 2 additions & 2 deletions doc/en/example/simple.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ the command line arguments before they get processed:
num = max(multiprocessing.cpu_count() / 2, 1)
args[:] = ["-n", str(num)] + args

If you have the `xdist plugin <https://pypi.python.org/pypi/pytest-xdist>`_ installed
If you have the `xdist plugin <https://pypi.org/project/pytest-xdist/>`_ installed
you will now always perform test runs using a number
of subprocesses close to your CPU. Running in an empty
directory with the above conftest.py::
Expand Down Expand Up @@ -778,7 +778,7 @@ which test got stuck, for example if pytest was run in quiet mode (``-q``) or yo
output. This is particularly a problem if the problem helps only sporadically, the famous "flaky" kind of tests.

``pytest`` sets a ``PYTEST_CURRENT_TEST`` environment variable when running tests, which can be inspected
by process monitoring utilities or libraries like `psutil <https://pypi.python.org/pypi/psutil>`_ to discover which
by process monitoring utilities or libraries like `psutil <https://pypi.org/project/psutil/>`_ to discover which
test got stuck if necessary:

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions doc/en/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ and does not handle Deferreds returned from a test in pytest style.
If you are using trial's unittest.TestCase chances are that you can
just run your tests even if you return Deferreds. In addition,
there also is a dedicated `pytest-twisted
<http://pypi.python.org/pypi/pytest-twisted>`_ plugin which allows you to
<https://pypi.org/project/pytest-twisted/>`_ plugin which allows you to
return deferreds from pytest-style tests, allowing the use of
:ref:`fixtures` and other features.

how does pytest work with Django?
++++++++++++++++++++++++++++++++++++++++++++++

In 2012, some work is going into the `pytest-django plugin <http://pypi.python.org/pypi/pytest-django>`_. It substitutes the usage of Django's
In 2012, some work is going into the `pytest-django plugin <https://pypi.org/project/pytest-django/>`_. It substitutes the usage of Django's
``manage.py test`` and allows the use of all pytest features_ most of which
are not available from Django directly.

Expand Down
2 changes: 1 addition & 1 deletion doc/en/fixture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ This makes use of the automatic caching mechanisms of pytest.
Another good approach is by adding the data files in the ``tests`` folder.
There are also community plugins available to help managing this aspect of
testing, e.g. `pytest-datadir <https://github.com/gabrielcnr/pytest-datadir>`__
and `pytest-datafiles <https://pypi.python.org/pypi/pytest-datafiles>`__.
and `pytest-datafiles <https://pypi.org/project/pytest-datafiles/>`__.

.. _smtpshared:

Expand Down
6 changes: 3 additions & 3 deletions doc/en/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Installation and Getting Started

**Platforms**: Unix/Posix and Windows

**PyPI package name**: `pytest <http://pypi.python.org/pypi/pytest>`_
**PyPI package name**: `pytest <https://pypi.org/project/pytest/>`_

**Dependencies**: `py <http://pypi.python.org/pypi/py>`_,
`colorama (Windows) <http://pypi.python.org/pypi/colorama>`_,
**Dependencies**: `py <https://pypi.org/project/py/>`_,
`colorama (Windows) <https://pypi.org/project/colorama/>`_,

**Documentation as PDF**: `download latest <https://media.readthedocs.org/pdf/pytest/latest/pytest.pdf>`_

Expand Down
6 changes: 3 additions & 3 deletions doc/en/goodpractices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ Note that this layout also works in conjunction with the ``src`` layout mentione
to avoid surprises such as a test module getting imported twice.


.. _`virtualenv`: http://pypi.python.org/pypi/virtualenv
.. _`virtualenv`: https://pypi.org/project/virtualenv/
.. _`buildout`: http://www.buildout.org/
.. _pip: http://pypi.python.org/pypi/pip
.. _pip: https://pypi.org/project/pip/

.. _`use tox`:

Expand Down Expand Up @@ -205,7 +205,7 @@ Integrating with setuptools / ``python setup.py test`` / ``pytest-runner``
--------------------------------------------------------------------------

You can integrate test runs into your setuptools based project
with the `pytest-runner <https://pypi.python.org/pypi/pytest-runner>`_ plugin.
with the `pytest-runner <https://pypi.org/project/pytest-runner/>`_ plugin.

Add this to ``setup.py`` file:

Expand Down
10 changes: 5 additions & 5 deletions doc/en/links.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
.. _`reStructured Text`: http://docutils.sourceforge.net
.. _`Python debugger`: http://docs.python.org/lib/module-pdb.html
.. _nose: https://nose.readthedocs.io/en/latest/
.. _pytest: http://pypi.python.org/pypi/pytest
.. _pytest: https://pypi.org/project/pytest/
.. _mercurial: http://mercurial.selenic.com/wiki/
.. _`setuptools`: http://pypi.python.org/pypi/setuptools
.. _`setuptools`: https://pypi.org/project/setuptools/
.. _`easy_install`:
.. _`distribute docs`:
.. _`distribute`: http://pypi.python.org/pypi/distribute
.. _`pip`: http://pypi.python.org/pypi/pip
.. _`virtualenv`: http://pypi.python.org/pypi/virtualenv
.. _`distribute`: https://pypi.org/project/distribute/
.. _`pip`: https://pypi.org/project/pip/
.. _`virtualenv`: https://pypi.org/project/virtualenv/
.. _hudson: http://hudson-ci.org/
.. _jenkins: http://jenkins-ci.org/
.. _tox: http://testrun.org/tox
Expand Down
24 changes: 12 additions & 12 deletions doc/en/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,39 @@ Here is a little annotated list for some popular plugins:

.. _`django`: https://www.djangoproject.com/

* `pytest-django <http://pypi.python.org/pypi/pytest-django>`_: write tests
* `pytest-django <https://pypi.org/project/pytest-django/>`_: write tests
for `django`_ apps, using pytest integration.

* `pytest-twisted <http://pypi.python.org/pypi/pytest-twisted>`_: write tests
* `pytest-twisted <https://pypi.org/project/pytest-twisted/>`_: write tests
for `twisted <http://twistedmatrix.com>`_ apps, starting a reactor and
processing deferreds from test functions.

* `pytest-cov <http://pypi.python.org/pypi/pytest-cov>`_:
* `pytest-cov <https://pypi.org/project/pytest-cov/>`_:
coverage reporting, compatible with distributed testing

* `pytest-xdist <http://pypi.python.org/pypi/pytest-xdist>`_:
* `pytest-xdist <https://pypi.org/project/pytest-xdist/>`_:
to distribute tests to CPUs and remote hosts, to run in boxed
mode which allows to survive segmentation faults, to run in
looponfailing mode, automatically re-running failing tests
on file changes.

* `pytest-instafail <http://pypi.python.org/pypi/pytest-instafail>`_:
* `pytest-instafail <https://pypi.org/project/pytest-instafail/>`_:
to report failures while the test run is happening.

* `pytest-bdd <http://pypi.python.org/pypi/pytest-bdd>`_ and
`pytest-konira <http://pypi.python.org/pypi/pytest-konira>`_
* `pytest-bdd <https://pypi.org/project/pytest-bdd/>`_ and
`pytest-konira <https://pypi.org/project/pytest-konira/>`_
to write tests using behaviour-driven testing.

* `pytest-timeout <http://pypi.python.org/pypi/pytest-timeout>`_:
* `pytest-timeout <https://pypi.org/project/pytest-timeout/>`_:
to timeout tests based on function marks or global definitions.

* `pytest-pep8 <http://pypi.python.org/pypi/pytest-pep8>`_:
* `pytest-pep8 <https://pypi.org/project/pytest-pep8/>`_:
a ``--pep8`` option to enable PEP8 compliance checking.

* `pytest-flakes <https://pypi.python.org/pypi/pytest-flakes>`_:
* `pytest-flakes <https://pypi.org/project/pytest-flakes/>`_:
check source code with pyflakes.

* `oejskit <http://pypi.python.org/pypi/oejskit>`_:
* `oejskit <https://pypi.org/project/oejskit/>`_:
a plugin to run javascript unittests in live browsers.

To see a complete list of all plugins with their latest testing
Expand All @@ -61,7 +61,7 @@ status against different pytest and Python versions, please visit

You may also discover more plugins through a `pytest- pypi.python.org search`_.

.. _`pytest- pypi.python.org search`: http://pypi.python.org/pypi?%3Aaction=search&term=pytest-&submit=search
.. _`pytest- pypi.python.org search`: https://pypi.org/search/?q=pytest-


.. _`available installable plugins`:
Expand Down
Loading