Pytest-cases

Latest version: v3.8.5

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

Scan your dependencies

Page 8 of 18

2.4.0

- `is_lazy` is now part of public API, and `_LazyValue` now has a cache mechanism like `_LazyTuple`. Fixes [143](https://github.com/smarie/python-pytest-cases/issues/143)

- `parametrize`: custom `ids` are now correctly taken into account when a single `lazy_value`is used for a tuple of parameters. This issue could be seen also with `parametrize_with_cases`: `idgen` does not seem to be taken into account when cases are unpacked into a tuple. Fixes [144](https://github.com/smarie/python-pytest-cases/issues/144).

- Empty case ids are now replaced with `'<empty_case_id>'` to avoid ambiguous interpretation of test ids. Fixes [142](https://github.com/smarie/python-pytest-cases/issues/142).

See [documentation page](https://smarie.github.io/python-pytest-cases/changelog/) for details.

2.3.0

- new `clone(self, remove_int_base=False)` API on `LazyValue` and `LazyTupleItem` instances. With this new API, on old `pytest` `< 5.3`, other plugins such as `pytest-harvest` can easily clone the contents from lazy values without having them inherit from `int` - which was a dirty hack used by `pytest-cases` to trick `pytest` to generate acceptable test ids in these old pytest versions. Also improved the `LazyValue`, `LazyTuple` and `LazyTupleItem` object model with equality and repr. Fixes [pytest-harvest43](https://github.com/smarie/python-pytest-harvest/issues/43)

See [documentation page](https://smarie.github.io/python-pytest-cases/changelog/) for details.

2.2.5

- Marks set on a case class are now propagated to cases in the class. So you can use for example [`pytest-pilot`](https://smarie.github.io/python-pytest-pilot/) more easily ! Fixes [#139](https://github.com/smarie/python-pytest-cases/issues/139)

See [documentation page](https://smarie.github.io/python-pytest-cases/changelog/) for details.

2.2.4

- Fixed "Created fixture names are not unique, please report" error when duplicate fixture reference is provided in a pytest.param. Fixes [138](https://github.com/smarie/python-pytest-cases/issues/138).

See [documentation page](https://smarie.github.io/python-pytest-cases/changelog/) for details.

2.2.3

- Fixed `TypeError: _idval() got an unexpected keyword argument 'item'` with `pytest` versions between 3.0.0 and 3.7.4. Fixed [136](https://github.com/smarie/python-pytest-cases/issues/136)

See [documentation page](https://smarie.github.io/python-pytest-cases/changelog/) for details.

2.2.2

- `parametrize_with_cases` now supports that `argnames` is a list or tuple, just as `pytest.mark.parametrize` does. PR [132](https://github.com/smarie/python-pytest-cases/pull/132), by [`saroad2`](https://github.com/saroad2).

See [documentation page](https://smarie.github.io/python-pytest-cases/changelog/) for details.

Page 8 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.