Pytes

Latest version: v7

Safety actively analyzes 619516 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 13

3.0.8

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

* Change capture.py's ``DontReadFromInput`` class to throw ``io.UnsupportedOperation`` errors rather
than ValueErrors in the ``fileno`` method (`2276`_).
Thanks `metasyn`_ for the PR.

* Fix exception formatting while importing modules when the exception message
contains non-ascii characters (`2336`_).
Thanks `fabioz`_ for the report and `nicoddemus`_ for the PR.

* Added documentation related to issue (`1937`_)
Thanks `skylarjhdownes`_ for the PR.

* Allow collecting files with any file extension as Python modules (`2369`_).
Thanks `Kodiologist`_ for the PR.

* Show the correct error message when collect "parametrize" func with wrong args (`2383`_).
Thanks `The-Compiler`_ for the report and `robin0371`_ for the PR.

*

*

*



.. _skylarjhdownes: https://github.com/skylarjhdownes
.. _fabioz: https://github.com/fabioz
.. _metasyn: https://github.com/metasyn
.. _Kodiologist: https://github.com/Kodiologist
.. _robin0371: https://github.com/robin0371


.. _1937: https://github.com/pytest-dev/pytest/issues/1937
.. _2276: https://github.com/pytest-dev/pytest/issues/2276
.. _2336: https://github.com/pytest-dev/pytest/issues/2336
.. _2369: https://github.com/pytest-dev/pytest/issues/2369
.. _2383: https://github.com/pytest-dev/pytest/issues/2383

3.0.7

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


* Fix issue in assertion rewriting breaking due to modules silently discarding
other modules when importing fails
Notably, importing the ``anydbm`` module is fixed. (`2248`_).
Thanks `pfhayes`_ for the PR.

* junitxml: Fix problematic case where system-out tag occured twice per testcase
element in the XML report. Thanks `kkoukiou`_ for the PR.

* Fix regression, pytest now skips unittest correctly if run with ``--pdb``
(`2137`_). Thanks to `gst`_ for the report and `mbyt`_ for the PR.

* Ignore exceptions raised from descriptors (e.g. properties) during Python test collection (`2234`_).
Thanks to `bluetech`_.

* ``--override-ini`` now correctly overrides some fundamental options like ``python_files`` (`2238`_).
Thanks `sirex`_ for the report and `nicoddemus`_ for the PR.

* Replace ``raise StopIteration`` usages in the code by simple ``returns`` to finish generators, in accordance to `PEP-479`_ (`2160`_).
Thanks `tgoodlet`_ for the report and `nicoddemus`_ for the PR.

* Fix internal errors when an unprintable ``AssertionError`` is raised inside a test.
Thanks `omerhadari`_ for the PR.

* Skipping plugin now also works with test items generated by custom collectors (`2231`_).
Thanks to `vidartf`_.

* Fix trailing whitespace in console output if no .ini file presented (`2281`_). Thanks `fbjorn`_ for the PR.

* Conditionless ``xfail`` markers no longer rely on the underlying test item
being an instance of ``PyobjMixin``, and can therefore apply to tests not
collected by the built-in python test collector. Thanks `barneygale`_ for the
PR.


.. _pfhayes: https://github.com/pfhayes
.. _bluetech: https://github.com/bluetech
.. _gst: https://github.com/gst
.. _sirex: https://github.com/sirex
.. _vidartf: https://github.com/vidartf
.. _kkoukiou: https://github.com/KKoukiou
.. _omerhadari: https://github.com/omerhadari
.. _fbjorn: https://github.com/fbjorn

.. _2248: https://github.com/pytest-dev/pytest/issues/2248
.. _2137: https://github.com/pytest-dev/pytest/issues/2137
.. _2160: https://github.com/pytest-dev/pytest/issues/2160
.. _2231: https://github.com/pytest-dev/pytest/issues/2231
.. _2234: https://github.com/pytest-dev/pytest/issues/2234
.. _2238: https://github.com/pytest-dev/pytest/issues/2238
.. _2281: https://github.com/pytest-dev/pytest/issues/2281

.. _PEP-479: https://www.python.org/dev/peps/pep-0479/

3.0.6

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

* pytest no longer generates ``PendingDeprecationWarning`` from its own operations, which was introduced by mistake in version ``3.0.5`` (`2118`_).
Thanks to `nicoddemus`_ for the report and `RonnyPfannschmidt`_ for the PR.


* pytest no longer recognizes coroutine functions as yield tests (`2129`_).
Thanks to `malinoff`_ for the PR.

* Plugins loaded by the ``PYTEST_PLUGINS`` environment variable are now automatically
considered for assertion rewriting (`2185`_).
Thanks `nicoddemus`_ for the PR.

* Improve error message when pytest.warns fails (`2150`_). The type(s) of the
expected warnings and the list of caught warnings is added to the
error message. Thanks `lesteve`_ for the PR.

* Fix ``pytester`` internal plugin to work correctly with latest versions of
``zope.interface`` (`1989`_). Thanks `nicoddemus`_ for the PR.

* Assert statements of the ``pytester`` plugin again benefit from assertion rewriting (`1920`_).
Thanks `RonnyPfannschmidt`_ for the report and `nicoddemus`_ for the PR.

* Specifying tests with colons like ``test_foo.py::test_bar`` for tests in
subdirectories with ini configuration files now uses the correct ini file
(`2148`_). Thanks `pelme`_.

* Fail ``testdir.runpytest().assert_outcomes()`` explicitly if the pytest
terminal output it relies on is missing. Thanks to `eli-b`_ for the PR.


.. _barneygale: https://github.com/barneygale
.. _lesteve: https://github.com/lesteve
.. _malinoff: https://github.com/malinoff
.. _pelme: https://github.com/pelme
.. _eli-b: https://github.com/eli-b

.. _2118: https://github.com/pytest-dev/pytest/issues/2118

.. _1989: https://github.com/pytest-dev/pytest/issues/1989
.. _1920: https://github.com/pytest-dev/pytest/issues/1920
.. _2129: https://github.com/pytest-dev/pytest/issues/2129
.. _2148: https://github.com/pytest-dev/pytest/issues/2148
.. _2150: https://github.com/pytest-dev/pytest/issues/2150
.. _2185: https://github.com/pytest-dev/pytest/issues/2185

3.0.5

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

* Add warning when not passing ``option=value`` correctly to ``-o/--override-ini`` (`2105`_).
Also improved the help documentation. Thanks to `mbukatov`_ for the report and
`lwm`_ for the PR.

* Now ``--confcutdir`` and ``--junit-xml`` are properly validated if they are directories
and filenames, respectively (`2089`_ and `2078`_). Thanks to `lwm`_ for the PR.

* Add hint to error message hinting possible missing ``__init__.py`` (`478`_). Thanks `DuncanBetts`_.

* More accurately describe when fixture finalization occurs in documentation (`687`_). Thanks `DuncanBetts`_.

* Provide ``:ref:`` targets for ``recwarn.rst`` so we can use intersphinx referencing.
Thanks to `dupuy`_ for the report and `lwm`_ for the PR.

* In Python 2, use a simple ``+-`` ASCII string in the string representation of ``pytest.approx`` (for example ``"4 +- 4.0e-06"``)
because it is brittle to handle that in different contexts and representations internally in pytest
which can result in bugs such as `2111`_. In Python 3, the representation still uses ``±`` (for example ``4 ± 4.0e-06``).
Thanks `kerrick-lyft`_ for the report and `nicoddemus`_ for the PR.

* Using ``item.Function``, ``item.Module``, etc., is now issuing deprecation warnings, prefer
``pytest.Function``, ``pytest.Module``, etc., instead (`2034`_).
Thanks `nmundar`_ for the PR.

* Fix error message using ``approx`` with complex numbers (`2082`_).
Thanks `adler-j`_ for the report and `nicoddemus`_ for the PR.

* Fixed false-positives warnings from assertion rewrite hook for modules imported more than
once by the ``pytest_plugins`` mechanism.
Thanks `nicoddemus`_ for the PR.

* Remove an internal cache which could cause hooks from ``conftest.py`` files in
sub-directories to be called in other directories incorrectly (`2016`_).
Thanks `d-b-w`_ for the report and `nicoddemus`_ for the PR.

* Remove internal code meant to support earlier Python 3 versions that produced the side effect
of leaving ``None`` in ``sys.modules`` when expressions were evaluated by pytest (for example passing a condition
as a string to ``pytest.mark.skipif``)(`2103`_).
Thanks `jaraco`_ for the report and `nicoddemus`_ for the PR.

* Cope gracefully with a .pyc file with no matching .py file (`2038`_). Thanks
`nedbat`_.

.. _adler-j: https://github.com/adler-j
.. _d-b-w: https://bitbucket.org/d-b-w/
.. _DuncanBetts: https://github.com/DuncanBetts
.. _dupuy: https://bitbucket.org/dupuy/
.. _kerrick-lyft: https://github.com/kerrick-lyft
.. _lwm: https://github.com/lwm
.. _mbukatov: https://github.com/mbukatov
.. _nedbat: https://github.com/nedbat
.. _nmundar: https://github.com/nmundar

.. _2016: https://github.com/pytest-dev/pytest/issues/2016
.. _2034: https://github.com/pytest-dev/pytest/issues/2034
.. _2038: https://github.com/pytest-dev/pytest/issues/2038
.. _2078: https://github.com/pytest-dev/pytest/issues/2078
.. _2082: https://github.com/pytest-dev/pytest/issues/2082
.. _2089: https://github.com/pytest-dev/pytest/issues/2089
.. _2103: https://github.com/pytest-dev/pytest/issues/2103
.. _2105: https://github.com/pytest-dev/pytest/issues/2105
.. _2111: https://github.com/pytest-dev/pytest/issues/2111
.. _478: https://github.com/pytest-dev/pytest/issues/478
.. _687: https://github.com/pytest-dev/pytest/issues/687

3.0.4

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

* Import errors when collecting test modules now display the full traceback (`1976`_).
Thanks `cwitty`_ for the report and `nicoddemus`_ for the PR.

* Fix confusing command-line help message for custom options with two or more ``metavar`` properties (`2004`_).
Thanks `okulynyak`_ and `davehunt`_ for the report and `nicoddemus`_ for the PR.

* When loading plugins, import errors which contain non-ascii messages are now properly handled in Python 2 (`1998`_).
Thanks `nicoddemus`_ for the PR.

* Fixed cyclic reference when ``pytest.raises`` is used in context-manager form (`1965`_). Also as a
result of this fix, ``sys.exc_info()`` is left empty in both context-manager and function call usages.
Previously, ``sys.exc_info`` would contain the exception caught by the context manager,
even when the expected exception occurred.
Thanks `MSeifert04`_ for the report and the PR.

* Fixed false-positives warnings from assertion rewrite hook for modules that were rewritten but
were later marked explicitly by ``pytest.register_assert_rewrite``
or implicitly as a plugin (`2005`_).
Thanks `RonnyPfannschmidt`_ for the report and `nicoddemus`_ for the PR.

* Report teardown output on test failure (`442`_).
Thanks `matclab`_ for the PR.

* Fix teardown error message in generated xUnit XML.
Thanks `gdyuldin`_ for the PR.

* Properly handle exceptions in ``multiprocessing`` tasks (`1984`_).
Thanks `adborden`_ for the report and `nicoddemus`_ for the PR.

* Clean up unittest TestCase objects after tests are complete (`1649`_).
Thanks `d_b_w`_ for the report and PR.


.. _adborden: https://github.com/adborden
.. _cwitty: https://github.com/cwitty
.. _d_b_w: https://github.com/d_b_w
.. _gdyuldin: https://github.com/gdyuldin
.. _matclab: https://github.com/matclab
.. _MSeifert04: https://github.com/MSeifert04
.. _okulynyak: https://github.com/okulynyak

.. _442: https://github.com/pytest-dev/pytest/issues/442
.. _1965: https://github.com/pytest-dev/pytest/issues/1965
.. _1976: https://github.com/pytest-dev/pytest/issues/1976
.. _1984: https://github.com/pytest-dev/pytest/issues/1984
.. _1998: https://github.com/pytest-dev/pytest/issues/1998
.. _2004: https://github.com/pytest-dev/pytest/issues/2004
.. _2005: https://github.com/pytest-dev/pytest/issues/2005
.. _1649: https://github.com/pytest-dev/pytest/issues/1649

3.0.3

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

* The ``ids`` argument to ``parametrize`` again accepts ``unicode`` strings
in Python 2 (`1905`_).
Thanks `philpep`_ for the report and `nicoddemus`_ for the PR.

* Assertions are now being rewritten for plugins in development mode
(``pip install -e``) (`1934`_).
Thanks `nicoddemus`_ for the PR.

* Fix pkg_resources import error in Jython projects (`1853`_).
Thanks `raquel-ucl`_ for the PR.

* Got rid of ``AttributeError: 'Module' object has no attribute '_obj'`` exception
in Python 3 (`1944`_).
Thanks `axil`_ for the PR.

* Explain a bad scope value passed to ``fixture`` declarations or
a ``MetaFunc.parametrize()`` call. Thanks `tgoodlet`_ for the PR.

* This version includes ``pluggy-0.4.0``, which correctly handles
``VersionConflict`` errors in plugins (`704`_).
Thanks `nicoddemus`_ for the PR.


.. _philpep: https://github.com/philpep
.. _raquel-ucl: https://github.com/raquel-ucl
.. _axil: https://github.com/axil
.. _tgoodlet: https://github.com/tgoodlet

.. _1853: https://github.com/pytest-dev/pytest/issues/1853
.. _1905: https://github.com/pytest-dev/pytest/issues/1905
.. _1934: https://github.com/pytest-dev/pytest/issues/1934
.. _1944: https://github.com/pytest-dev/pytest/issues/1944
.. _704: https://github.com/pytest-dev/pytest/issues/704

Page 1 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.