Pytest-cases

Latest version: v3.8.6

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

Scan your dependencies

Page 18 of 20

1.2.1

Id of test cases with marks was appearing as `ParameterSet`. Fixed it.

1.2.0

Pytest marks such as `pytest.mark.skipif` can now be used on case functions. As a consequence, `get_all_cases` is now the recommended function to use instead of `extract_cases_from_module` to perform manual collection. Indeed `get_all_cases` correctly prepares the resulting parameters list so that pytest sees the marks. Fixed [21](https://github.com/smarie/python-pytest-cases/issues/21).

Fixed parametrization order when `pytest_fixture_plus` is used with several `pytest.mark.parametrize`. Fixed [22](https://github.com/smarie/python-pytest-cases/issues/22).

1.1.1

When `pytest_fixture_plus` is used on a function marked as parametrized, some fixtures are generated (one for each parameter). Generated fixture names now follow the pattern `<fixturename>__<paramname>`.
Fixed [20](https://github.com/smarie/python-pytest-cases/issues/20).

1.1.0

New decorator `pytest_fixture_plus` allows to use several `pytest.mark.parametrize` on a fixture. Therefore one can use multiple `cases_data` decorators, too. Fixes [19](https://github.com/smarie/python-pytest-cases/issues/19).
*Note: this is a temporary feature, that will be removed if/when [pytest supports it](https://github.com/pytest-dev/pytest/issues/3960).*

1.0.0

Pytest 2.x is now supported. Fixes [14](https://github.com/smarie/python-pytest-cases/issues/14).

**New feature:** `cases_fixture` ! Now you can put your cases data retrieval in a fixture so that its duration does not enter into the test duration. This is particularly interesting if you use [pytest-harvest](https://smarie.github.io/python-pytest-harvest/) to create benchmarks: you probably do not want the case data retrieval/parsing to be counted in the test duration, especially if you use caching on the case function to accelerate subsequent retrievals. Fixes [#15](https://github.com/smarie/python-pytest-cases/issues/15).

0.10.1

0.10.0 - support for python 2

Python 2 is now supported. Fixed [3](https://github.com/smarie/python-pytest-cases/issues/3).

- Note: `CaseData`, `Given`, `ExpectedNormal`, `ExpectedError`, and `MultipleStepsCaseData` type hints is not created in python 2 and python<3.5

Page 18 of 20

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.