Skip to content
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

Update pytest to 3.5.1 #132

Closed
wants to merge 1 commit into from
Closed

Conversation

pyup-bot
Copy link
Collaborator

This PR updates pytest from 3.4.0 to 3.5.1.

Changelog

3.5.0

=========================

Deprecations and Removals
-------------------------

- ``record_xml_property`` fixture is now deprecated in favor of the more
generic ``record_property``. (`2770
<https://github.com/pytest-dev/pytest/issues/2770>`_)

- Defining ``pytest_plugins`` is now deprecated in non-top-level conftest.py
files, because they "leak" to the entire directory tree. (`3084
<https://github.com/pytest-dev/pytest/issues/3084>`_)


Features
--------

- New ``--show-capture`` command-line option that allows to specify how to
display captured output when tests fail: ``no``, ``stdout``, ``stderr``,
``log`` or ``all`` (the default). (`1478
<https://github.com/pytest-dev/pytest/issues/1478>`_)

- New ``--rootdir`` command-line option to override the rules for discovering
the root directory. See `customize
<https://docs.pytest.org/en/latest/customize.html>`_ in the documentation for
details. (`1642 <https://github.com/pytest-dev/pytest/issues/1642>`_)

- Fixtures are now instantiated based on their scopes, with higher-scoped
fixtures (such as ``session``) being instantiated first than lower-scoped
fixtures (such as ``function``). The relative order of fixtures of the same
scope is kept unchanged, based in their declaration order and their
dependencies. (`2405 <https://github.com/pytest-dev/pytest/issues/2405>`_)

- ``record_xml_property`` renamed to ``record_property`` and is now compatible
with xdist, markers and any reporter. ``record_xml_property`` name is now
deprecated. (`2770 <https://github.com/pytest-dev/pytest/issues/2770>`_)

- New ``--nf``, ``--new-first`` options: run new tests first followed by the
rest of the tests, in both cases tests are also sorted by the file modified
time, with more recent files coming first. (`3034
<https://github.com/pytest-dev/pytest/issues/3034>`_)

- New ``--last-failed-no-failures`` command-line option that allows to specify
the behavior of the cache plugin's --last-failed`` feature when no tests
failed in the last run (or no cache was found): ``none`` or ``all`` (the
default). (`3139 <https://github.com/pytest-dev/pytest/issues/3139>`_)

- New ``--doctest-continue-on-failure`` command-line option to enable doctests
to show multiple failures for each snippet, instead of stopping at the first
failure. (`3149 <https://github.com/pytest-dev/pytest/issues/3149>`_)

- Captured log messages are added to the ``<system-out>`` tag in the generated
junit xml file if the ``junit_logging`` ini option is set to ``system-out``.
If the value of this ini option is ``system-err`, the logs are written to
``<system-err>``. The default value for ``junit_logging`` is ``no``, meaning
captured logs are not written to the output file. (`3156
<https://github.com/pytest-dev/pytest/issues/3156>`_)

- Allow the logging plugin to handle ``pytest_runtest_logstart`` and
``pytest_runtest_logfinish`` hooks when live logs are enabled. (`3189
<https://github.com/pytest-dev/pytest/issues/3189>`_)

- Passing `--log-cli-level` in the command-line now automatically activates
live logging. (`3190 <https://github.com/pytest-dev/pytest/issues/3190>`_)

- Add command line option ``--deselect`` to allow deselection of individual
tests at collection time. (`3198
<https://github.com/pytest-dev/pytest/issues/3198>`_)

- Captured logs are printed before entering pdb. (`3204
<https://github.com/pytest-dev/pytest/issues/3204>`_)

- Deselected item count is now shown before tests are run, e.g. ``collected X
items / Y deselected``. (`3213
<https://github.com/pytest-dev/pytest/issues/3213>`_)

- The builtin module ``platform`` is now available for use in expressions in
``pytest.mark``. (`3236
<https://github.com/pytest-dev/pytest/issues/3236>`_)

- The *short test summary info* section now is displayed after tracebacks and
warnings in the terminal. (`3255
<https://github.com/pytest-dev/pytest/issues/3255>`_)

- New ``--verbosity`` flag to set verbosity level explicitly. (`3296
<https://github.com/pytest-dev/pytest/issues/3296>`_)

- ``pytest.approx`` now accepts comparing a numpy array with a scalar. (`3312
<https://github.com/pytest-dev/pytest/issues/3312>`_)


Bug Fixes
---------

- Suppress ``IOError`` when closing the temporary file used for capturing
streams in Python 2.7. (`2370
<https://github.com/pytest-dev/pytest/issues/2370>`_)

- Fixed ``clear()`` method on ``caplog`` fixture which cleared ``records``, but
not the ``text`` property. (`3297
<https://github.com/pytest-dev/pytest/issues/3297>`_)

- During test collection, when stdin is not allowed to be read, the
``DontReadFromStdin`` object still allow itself to be iterable and resolved
to an iterator without crashing. (`3314
<https://github.com/pytest-dev/pytest/issues/3314>`_)


Improved Documentation
----------------------

- Added a `reference <https://docs.pytest.org/en/latest/reference.html>`_ page
to the docs. (`1713 <https://github.com/pytest-dev/pytest/issues/1713>`_)


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

- Change minimum requirement of ``attrs`` to ``17.4.0``. (`3228
<https://github.com/pytest-dev/pytest/issues/3228>`_)

- Renamed example directories so all tests pass when ran from the base
directory. (`3245 <https://github.com/pytest-dev/pytest/issues/3245>`_)

- Internal ``mark.py`` module has been turned into a package. (`3250
<https://github.com/pytest-dev/pytest/issues/3250>`_)

- ``pytest`` now depends on the `more-itertools
<https://github.com/erikrose/more-itertools>`_ package. (`3265
<https://github.com/pytest-dev/pytest/issues/3265>`_)

- Added warning when ``[pytest]`` section is used in a ``.cfg`` file passed
with ``-c`` (`3268 <https://github.com/pytest-dev/pytest/issues/3268>`_)

- ``nodeids`` can now be passed explicitly to ``FSCollector`` and ``Node``
constructors. (`3291 <https://github.com/pytest-dev/pytest/issues/3291>`_)

- Internal refactoring of ``FormattedExcinfo`` to use ``attrs`` facilities and
remove old support code for legacy Python versions. (`3292
<https://github.com/pytest-dev/pytest/issues/3292>`_)

- Refactoring to unify how verbosity is handled internally. (`3296
<https://github.com/pytest-dev/pytest/issues/3296>`_)

- Internal refactoring to better integrate with argparse. (`3304
<https://github.com/pytest-dev/pytest/issues/3304>`_)

- Fix a python example when calling a fixture in doc/en/usage.rst (`3308
<https://github.com/pytest-dev/pytest/issues/3308>`_)

3.4.2

=========================

Bug Fixes
---------

- Removed progress information when capture option is ``no``. (`3203
<https://github.com/pytest-dev/pytest/issues/3203>`_)

- Refactor check of bindir from ``exists`` to ``isdir``. (`3241
<https://github.com/pytest-dev/pytest/issues/3241>`_)

- Fix ``TypeError`` issue when using ``approx`` with a ``Decimal`` value.
(`3247 <https://github.com/pytest-dev/pytest/issues/3247>`_)

- Fix reference cycle generated when using the ``request`` fixture. (`3249
<https://github.com/pytest-dev/pytest/issues/3249>`_)

- ``[tool:pytest]`` sections in ``*.cfg`` files passed by the ``-c`` option are
now properly recognized. (`3260
<https://github.com/pytest-dev/pytest/issues/3260>`_)


Improved Documentation
----------------------

- Add logging plugin to plugins list. (`3209
<https://github.com/pytest-dev/pytest/issues/3209>`_)


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

- Fix minor typo in fixture.rst (`3259
<https://github.com/pytest-dev/pytest/issues/3259>`_)

3.4.1

=========================

Bug Fixes
---------

- Move import of ``doctest.UnexpectedException`` to top-level to avoid possible
errors when using ``--pdb``. (`1810
<https://github.com/pytest-dev/pytest/issues/1810>`_)

- Added printing of captured stdout/stderr before entering pdb, and improved a
test which was giving false negatives about output capturing. (`3052
<https://github.com/pytest-dev/pytest/issues/3052>`_)

- Fix ordering of tests using parametrized fixtures which can lead to fixtures
being created more than necessary. (`3161
<https://github.com/pytest-dev/pytest/issues/3161>`_)

- Fix bug where logging happening at hooks outside of "test run" hooks would
cause an internal error. (`3184
<https://github.com/pytest-dev/pytest/issues/3184>`_)

- Detect arguments injected by ``unittest.mock.patch`` decorator correctly when
pypi ``mock.patch`` is installed and imported. (`3206
<https://github.com/pytest-dev/pytest/issues/3206>`_)

- Errors shown when a ``pytest.raises()`` with ``match=`` fails are now cleaner
on what happened: When no exception was raised, the "matching '...'" part got
removed as it falsely implies that an exception was raised but it didn't
match. When a wrong exception was raised, it's now thrown (like
``pytest.raised()`` without ``match=`` would) instead of complaining about
the unmatched text. (`3222
<https://github.com/pytest-dev/pytest/issues/3222>`_)

- Fixed output capture handling in doctests on macOS. (`985
<https://github.com/pytest-dev/pytest/issues/985>`_)


Improved Documentation
----------------------

- Add Sphinx parameter docs for ``match`` and ``message`` args to
``pytest.raises``. (`3202
<https://github.com/pytest-dev/pytest/issues/3202>`_)


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

- pytest has changed the publication procedure and is now being published to
PyPI directly from Travis. (`3060
<https://github.com/pytest-dev/pytest/issues/3060>`_)

- Rename ``ParameterSet._for_parameterize()`` to ``_for_parametrize()`` in
order to comply with the naming convention. (`3166
<https://github.com/pytest-dev/pytest/issues/3166>`_)

- Skip failing pdb/doctest test on mac. (`985
<https://github.com/pytest-dev/pytest/issues/985>`_)
Links

@pyup-bot pyup-bot mentioned this pull request Apr 25, 2018
@codecov-io
Copy link

codecov-io commented Apr 25, 2018

Codecov Report

Merging #132 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #132   +/-   ##
=======================================
  Coverage   45.53%   45.53%           
=======================================
  Files          26       26           
  Lines        2205     2205           
=======================================
  Hits         1004     1004           
  Misses       1201     1201

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f449e02...e697dac. Read the comment docs.

@ibejohn818 ibejohn818 closed this May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants