Pytest-dependency

Latest version: v0.6.0

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

Scan your dependencies

Page 2 of 2

0.3

~~~~~~~~~~~~~~~~

New features
------------

+ `7`_: Add a configuration switch to implicitly mark all tests.

+ `10`_: Add an option to ignore unknown dependencies.

Incompatible changes
--------------------

+ Prepend the class name to the default test name for test class
methods. This fixes a potential name conflict, see `6`_.

If your code uses test classes and you reference test methods by
their default name, you must add the class name. E.g. if you have
something like:

.. code-block:: python

class TestClass(object):

pytest.mark.dependency()
def test_a():
pass

pytest.mark.dependency(depends=["test_a"])
def test_b():
pass

you need to change this to:

.. code-block:: python

class TestClass(object):

pytest.mark.dependency()
def test_a():
pass

pytest.mark.dependency(depends=["TestClass::test_a"])
def test_b():
pass

If you override the test name in the :func:`pytest.mark.dependency`
marker, nothing need to be changed.

Bug fixes and minor changes
---------------------------

+ `11`_: show the name of the skipped test.
(Thanks asteriogonzalez!)

+ `13`_: Do not import pytest in setup.py to make it compatible with
pipenv.

+ `15`_: tests fail with pytest 3.3.0.

+ `8`_: document incompatibility with parallelization in
pytest-xdist.

+ Clarify in the documentation that Python 3.1 is not officially
supported because pytest 2.8 does not support it. There is no known
issue with Python 3.1 though.

.. _15: https://github.com/RKrahl/pytest-dependency/issues/15
.. _13: https://github.com/RKrahl/pytest-dependency/issues/13
.. _11: https://github.com/RKrahl/pytest-dependency/pull/11
.. _10: https://github.com/RKrahl/pytest-dependency/issues/10
.. _8: https://github.com/RKrahl/pytest-dependency/issues/8
.. _7: https://github.com/RKrahl/pytest-dependency/issues/7
.. _6: https://github.com/RKrahl/pytest-dependency/issues/6

0.2

~~~~~~~~~~~~~~~~

New features
------------

+ `2`_: Add documentation.

+ `4`_: Add a depend() function to add a dependency to a test at
runtime.

.. _4: https://github.com/RKrahl/pytest-dependency/issues/4
.. _2: https://github.com/RKrahl/pytest-dependency/issues/2

0.1

~~~~~~~~~~~~~~~~

+ Initial release as an independent Python module.

This code was first developed as part of a larger package,
`python-icat`_, at Helmholtz-Zentrum Berlin für Materialien und
Energie.

.. _python-icat: https://github.com/icatproject/python-icat

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.