Skip to content

Commit

Permalink
Merge branch 'master' into fix-package-skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Galiev committed Sep 27, 2019
2 parents 3eac3ca + 6bfd30d commit 6e5538b
Show file tree
Hide file tree
Showing 69 changed files with 1,301 additions and 540 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ jobs:
python: 'pypy3'

- env: TOXENV=py35-xdist
dist: trusty
python: '3.5.0'
python: '3.5'

# Coverage for:
# - pytester's LsofFdLeakChecker
Expand Down
5 changes: 5 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Andras Tim
Andrea Cimatoribus
Andreas Zeidler
Andrey Paramonov
Andrzej Klajnert
Andrzej Ostrowski
Andy Freeland
Anthon van der Neut
Expand Down Expand Up @@ -55,6 +56,7 @@ Charnjit SiNGH (CCSJ)
Chris Lamb
Christian Boelsen
Christian Fetzer
Christian Neumüller
Christian Theunert
Christian Tismer
Christopher Gilling
Expand Down Expand Up @@ -97,6 +99,7 @@ Feng Ma
Florian Bruhin
Floris Bruynooghe
Gabriel Reis
Gene Wood
George Kussumoto
Georgy Dyuldin
Graham Horler
Expand Down Expand Up @@ -174,6 +177,7 @@ mbyt
Michael Aquilina
Michael Birtwell
Michael Droettboom
Michael Goerz
Michael Seifert
Michal Wajszczuk
Mihai Capotă
Expand Down Expand Up @@ -210,6 +214,7 @@ Raphael Castaneda
Raphael Pierzina
Raquel Alegre
Ravi Chandra
Robert Holt
Roberto Polli
Roland Puntaier
Romain Dorgueil
Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,48 @@ with advance notice in the **Deprecations** section of releases.
.. towncrier release notes start
pytest 5.1.3 (2019-09-18)
=========================

Bug Fixes
---------

- `#5807 <https://github.com/pytest-dev/pytest/issues/5807>`_: Fix pypy3.6 (nightly) on windows.


- `#5811 <https://github.com/pytest-dev/pytest/issues/5811>`_: Handle ``--fulltrace`` correctly with ``pytest.raises``.


- `#5819 <https://github.com/pytest-dev/pytest/issues/5819>`_: Windows: Fix regression with conftest whose qualified name contains uppercase
characters (introduced by #5792).


pytest 5.1.2 (2019-08-30)
=========================

Bug Fixes
---------

- `#2270 <https://github.com/pytest-dev/pytest/issues/2270>`_: Fixed ``self`` reference in function-scoped fixtures defined plugin classes: previously ``self``
would be a reference to a *test* class, not the *plugin* class.


- `#570 <https://github.com/pytest-dev/pytest/issues/570>`_: Fixed long standing issue where fixture scope was not respected when indirect fixtures were used during
parametrization.


- `#5782 <https://github.com/pytest-dev/pytest/issues/5782>`_: Fix decoding error when printing an error response from ``--pastebin``.


- `#5786 <https://github.com/pytest-dev/pytest/issues/5786>`_: Chained exceptions in test and collection reports are now correctly serialized, allowing plugins like
``pytest-xdist`` to display them properly.


- `#5792 <https://github.com/pytest-dev/pytest/issues/5792>`_: Windows: Fix error that occurs in certain circumstances when loading
``conftest.py`` from a working directory that has casing other than the one stored
in the filesystem (e.g., ``c:\test`` instead of ``C:\test``).


pytest 5.1.1 (2019-08-20)
=========================

Expand Down
2 changes: 2 additions & 0 deletions changelog/1682.deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Passing arguments to pytest.fixture() as positional arguments is deprecated - pass them
as a keyword argument instead.
3 changes: 3 additions & 0 deletions changelog/1682.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The ``scope`` parameter of ``@pytest.fixture`` can now be a callable that receives
the fixture name and the ``config`` object as keyword-only parameters.
See `the docs <https://docs.pytest.org/en/fixture.html#dynamic-scope>`__ for more information.
1 change: 1 addition & 0 deletions changelog/5056.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The HelpFormatter uses ``py.io.get_terminal_width`` for better width detection.
1 change: 1 addition & 0 deletions changelog/5764.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
New behavior of the ``--pastebin`` option: failures to connect to the pastebin server are reported, without failing the pytest run
1 change: 0 additions & 1 deletion changelog/5782.bugfix.rst

This file was deleted.

1 change: 1 addition & 0 deletions changelog/5806.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix "lexer" being used when uploading to bpaste.net from ``--pastebin`` to "text".
2 changes: 1 addition & 1 deletion doc/en/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ REGENDOC_ARGS := \
--normalize "/[ \t]+\n/\n/" \
--normalize "~\$$REGENDOC_TMPDIR~/home/sweet/project~" \
--normalize "~/path/to/example~/home/sweet/project~" \
--normalize "/in \d+.\d+ seconds/in 0.12 seconds/" \
--normalize "/in \d.\d\ds/in 0.12s/" \
--normalize "@/tmp/pytest-of-.*/pytest-\d+@PYTEST_TMPDIR@" \
--normalize "@pytest-(\d+)\\.[^ ,]+@pytest-\1.x.y@" \
--normalize "@(This is pytest version )(\d+)\\.[^ ,]+@\1\2.x.y@" \
Expand Down
2 changes: 2 additions & 0 deletions doc/en/announce/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Release announcements
:maxdepth: 2


release-5.1.3
release-5.1.2
release-5.1.1
release-5.1.0
release-5.0.1
Expand Down
23 changes: 23 additions & 0 deletions doc/en/announce/release-5.1.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pytest-5.1.2
=======================================

pytest 5.1.2 has just been released to PyPI.

This is a bug-fix release, being a drop-in replacement. To upgrade::

pip install --upgrade pytest

The full changelog is available at https://docs.pytest.org/en/latest/changelog.html.

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

* Andrzej Klajnert
* Anthony Sottile
* Bruno Oliveira
* Christian Neumüller
* Robert Holt
* linchiwei123


Happy testing,
The pytest Development Team
23 changes: 23 additions & 0 deletions doc/en/announce/release-5.1.3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pytest-5.1.3
=======================================

pytest 5.1.3 has just been released to PyPI.

This is a bug-fix release, being a drop-in replacement. To upgrade::

pip install --upgrade pytest

The full changelog is available at https://docs.pytest.org/en/latest/changelog.html.

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

* Anthony Sottile
* Bruno Oliveira
* Christian Neumüller
* Daniel Hahler
* Gene Wood
* Hugo


Happy testing,
The pytest Development Team
6 changes: 3 additions & 3 deletions doc/en/assert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ you will see the return value of the function call:
E + where 3 = f()
test_assert1.py:6: AssertionError
============================ 1 failed in 0.02s =============================
============================ 1 failed in 0.12s =============================
``pytest`` has support for showing the values of the most common subexpressions
including calls, attributes, comparisons, and binary and unary
Expand Down Expand Up @@ -208,7 +208,7 @@ if you run this module:
E Use -v to get the full diff
test_assert2.py:6: AssertionError
============================ 1 failed in 0.02s =============================
============================ 1 failed in 0.12s =============================
Special comparisons are done for a number of cases:

Expand Down Expand Up @@ -279,7 +279,7 @@ the conftest file:
E vals: 1 != 2
test_foocompare.py:12: AssertionError
1 failed in 0.02s
1 failed in 0.12s
.. _assert-details:
.. _`assert introspection`:
Expand Down
2 changes: 1 addition & 1 deletion doc/en/builtin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
in python < 3.6 this is a pathlib2.Path
no tests ran in 0.00s
no tests ran in 0.12s
You can also interactively ask for help, e.g. by typing on the Python interactive prompt something like:

Expand Down
14 changes: 7 additions & 7 deletions doc/en/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ If you run this for the first time you will see two failures:
E Failed: bad luck
test_50.py:7: Failed
2 failed, 48 passed in 0.08s
2 failed, 48 passed in 0.12s
If you then run it with ``--lf``:

Expand Down Expand Up @@ -114,7 +114,7 @@ If you then run it with ``--lf``:
E Failed: bad luck
test_50.py:7: Failed
===================== 2 failed, 48 deselected in 0.02s =====================
===================== 2 failed, 48 deselected in 0.12s =====================
You have run only the two failing tests from the last run, while the 48 passing
tests have not been run ("deselected").
Expand Down Expand Up @@ -158,7 +158,7 @@ of ``FF`` and dots):
E Failed: bad luck
test_50.py:7: Failed
======================= 2 failed, 48 passed in 0.07s =======================
======================= 2 failed, 48 passed in 0.12s =======================
.. _`config.cache`:

Expand Down Expand Up @@ -230,7 +230,7 @@ If you run this command for the first time, you can see the print statement:
test_caching.py:20: AssertionError
-------------------------- Captured stdout setup ---------------------------
running expensive computation...
1 failed in 0.02s
1 failed in 0.12s
If you run it a second time, the value will be retrieved from
the cache and nothing will be printed:
Expand All @@ -249,7 +249,7 @@ the cache and nothing will be printed:
E assert 42 == 23
test_caching.py:20: AssertionError
1 failed in 0.02s
1 failed in 0.12s
See the :ref:`cache-api` for more details.

Expand Down Expand Up @@ -283,7 +283,7 @@ You can always peek at the content of the cache using the
example/value contains:
42
========================== no tests ran in 0.00s ===========================
========================== no tests ran in 0.12s ===========================
``--cache-show`` takes an optional argument to specify a glob pattern for
filtering:
Expand All @@ -300,7 +300,7 @@ filtering:
example/value contains:
42
========================== no tests ran in 0.00s ===========================
========================== no tests ran in 0.12s ===========================
Clearing Cache content
----------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/en/capture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ of the failing function and hide the other one:
test_module.py:12: AssertionError
-------------------------- Captured stdout setup ---------------------------
setting up <function test_func2 at 0xdeadbeef>
======================= 1 failed, 1 passed in 0.02s ========================
======================= 1 failed, 1 passed in 0.12s ========================
Accessing captured output from a test function
---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/en/customize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ check for ini-files as follows:
# first look for pytest.ini files
path/pytest.ini
path/setup.cfg # must also contain [tool:pytest] section to match
path/tox.ini # must also contain [pytest] section to match
path/setup.cfg # must also contain [tool:pytest] section to match
pytest.ini
... # all the way down to the root
Expand Down
4 changes: 2 additions & 2 deletions doc/en/doctest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ then you can just invoke ``pytest`` directly:
test_example.txt . [100%]
============================ 1 passed in 0.01s =============================
============================ 1 passed in 0.12s =============================
By default, pytest will collect ``test*.txt`` files looking for doctest directives, but you
can pass additional globs using the ``--doctest-glob`` option (multi-allowed).
Expand Down Expand Up @@ -66,7 +66,7 @@ and functions, including from test modules:
mymodule.py . [ 50%]
test_example.txt . [100%]
============================ 2 passed in 0.01s =============================
============================ 2 passed in 0.12s =============================
You can make these changes permanent in your project by
putting them into a pytest.ini file like this:
Expand Down
2 changes: 1 addition & 1 deletion doc/en/example/costlysetup/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest


@pytest.fixture("session")
@pytest.fixture(scope="session")
def setup(request):
setup = CostlySetup()
yield setup
Expand Down

0 comments on commit 6e5538b

Please sign in to comment.