Merge remote-tracking branch 'upstream/master' into merge-master-into-features

This commit is contained in:
Bruno Oliveira
2018-04-24 21:26:45 -03:00
26 changed files with 201 additions and 61 deletions
+1
View File
@@ -6,6 +6,7 @@ Release announcements
:maxdepth: 2
release-3.5.1
release-3.5.0
release-3.4.2
release-3.4.1
+30
View File
@@ -0,0 +1,30 @@
pytest-3.5.1
=======================================
pytest 3.5.1 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 http://doc.pytest.org/en/latest/changelog.html.
Thanks to all who contributed to this release, among them:
* Brian Maissy
* Bruno Oliveira
* Darren Burns
* David Chudzicki
* Floris Bruynooghe
* Holger Kohr
* Irmen de Jong
* Jeffrey Rackauckas
* Rachel Kogan
* Ronny Pfannschmidt
* Stefan Scherfke
* Tim Strazny
* Семён Марьясин
Happy testing,
The pytest Development Team
+4 -4
View File
@@ -12,7 +12,7 @@ For information on plugin hooks and objects, see :ref:`plugins`.
For information on the ``pytest.mark`` mechanism, see :ref:`mark`.
For information about fixtures, see :ref:`fixtures`. To see a complete list of available fixtures, type::
For information about fixtures, see :ref:`fixtures`. To see a complete list of available fixtures (add ``-v`` to also see fixtures with leading ``_``), type ::
$ pytest -q --fixtures
cache
@@ -77,9 +77,9 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
Captured logs are available through the following methods::
* caplog.text() -> string containing formatted log output
* caplog.records() -> list of logging.LogRecord instances
* caplog.record_tuples() -> list of (logger_name, level, message) tuples
* caplog.text -> string containing formatted log output
* caplog.records -> list of logging.LogRecord instances
* caplog.record_tuples -> list of (logger_name, level, message) tuples
* caplog.clear() -> clear captured records and formatted log output string
monkeypatch
The returned ``monkeypatch`` fixture provides these
+1 -1
View File
@@ -358,7 +358,7 @@ get on the terminal - we are working on that)::
> int(s)
E ValueError: invalid literal for int() with base 10: 'qwe'
<0-codegen $PYTHON_PREFIX/lib/python3.5/site-packages/_pytest/python_api.py:613>:1: ValueError
<0-codegen $PYTHON_PREFIX/lib/python3.5/site-packages/_pytest/python_api.py:615>:1: ValueError
______________________ TestRaises.test_raises_doesnt _______________________
self = <failure_demo.TestRaises object at 0xdeadbeef>
+1 -1
View File
@@ -102,7 +102,7 @@ the command line arguments before they get processed:
# content of conftest.py
import sys
def pytest_cmdline_preparse(args):
def pytest_load_initial_conftests(args):
if 'xdist' in sys.modules: # pytest-xdist plugin
import multiprocessing
num = max(multiprocessing.cpu_count() / 2, 1)
+3 -3
View File
@@ -111,11 +111,11 @@ with a list of available function arguments.
.. note::
You can always issue::
You can always issue ::
pytest --fixtures test_simplefactory.py
to see available fixtures.
to see available fixtures (fixtures with leading ``_`` are only shown if you add the ``-v`` option).
Fixtures: a prime example of dependency injection
---------------------------------------------------
@@ -141,7 +141,7 @@ automatically gets discovered by pytest. The discovery of
fixture functions starts at test classes, then test modules, then
``conftest.py`` files and finally builtin and third party plugins.
You can also use the ``conftest.py`` file to implement
You can also use the ``conftest.py`` file to implement
:ref:`local per-directory plugins <conftest.py plugins>`.
Sharing test data
+2
View File
@@ -166,6 +166,8 @@ Find out what kind of builtin :ref:`pytest fixtures <fixtures>` exist with the c
pytest --fixtures # shows builtin and custom fixtures
Note that this command omits fixtures with leading ``_`` unless the ``-v`` option is added.
Continue reading
-------------------------------------
+1 -1
View File
@@ -23,7 +23,7 @@ command line options
``--full-trace``
don't cut any tracebacks (default is to cut).
``--fixtures``
show available function arguments, sorted by plugin
show available fixtures, sorted by plugin appearance (fixtures with leading ``_`` are only shown with '-v')
Start improving this plugin in 30 seconds
=========================================