Pytest-cases

Latest version: v3.8.5

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

Scan your dependencies

Page 6 of 18

3.4.0

- Legacy v1 API was dropped. Fixes [192](https://github.com/smarie/python-pytest-cases/issues/192)

- Unbound case functions in a class (e.g. `Foo.bar`) can now be directly passed to `parametrize_with_cases` without instantiating the class, e.g. `parametrize_with_cases(cases=Foo.bar)`. Fixes [159](https://github.com/smarie/python-pytest-cases/issues/159)

- Fixed bug with concatenation of marks on cases. Fixes [191](https://github.com/smarie/python-pytest-cases/issues/191)

- Fixed an issue where a case transformed into a fixture, with the same name as the fixture it requires, would lead to a `pytest` fixture recursion.

- Fixtures in case files can now be automatically imported using the **experimental** `parametrize_with_cases(import_fixtures=True)`. Fixes [193](https://github.com/smarie/python-pytest-cases/issues/193)

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

3.3.0

- Migrated to Github Actions + `nox` for CI/CD.

- New helper function `get_current_case_id` to get the current case id for a given `pytest` request or item. Fixes [189](https://github.com/smarie/python-pytest-cases/issues/189)

- Extended the support of fixture closure modifications to `remove` and `insert(0, f)`. This in particular solves an issue with `pytest-asyncio`. Fixes [176](https://github.com/smarie/python-pytest-cases/issues/176)

- New `filters` module providing helper functions `has_tag`, `id_has_prefix`, `id_has_suffix`, `id_match_regex` to easily create custom filters for use in `parametrize_with_cases(filter=...)`. PR [184](https://github.com/smarie/python-pytest-cases/pull/184) by [saroad2](https://github.com/saroad2), (thanks !).

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

3.2.1

- Fixed `fixture 'self' not found` issue when `fixture` was used to decorate a class method not explicitly depending on `request`. Fixed [182](https://github.com/smarie/python-pytest-cases/issues/182)

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

3.2.0

- New: from version `3.2` on, if `auto_refs=True` (default), `parametrize` will automatically detect fixture symbols in the list of argvalues, and will create `fixture_ref`s automatically around them so that you don't need to. Fixes [177](https://github.com/smarie/python-pytest-cases/issues/177)

- Fixed ordering issue happening on linux targets when several `parametrize` are used to decorate the same function. Fixes [180](https://github.com/smarie/python-pytest-cases/issues/180)

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

3.1.2

- Now appending fixtures to the closure once it has been built is supported. This fixes an issue with `pytest-asyncio`. Fixes [176](https://github.com/smarie/python-pytest-cases/issues/176)

- Fixed issue when `parametrize_with_cases` was used on case functions themselves (nesting/recursion). This was due to a lack of support of the `place_as` magic pytest attribute. Fixes [179](https://github.com/smarie/python-pytest-cases/issues/179)

- Added a warning concerning usage of indirect in parametrize when fixture references are present. See [150](https://github.com/smarie/python-pytest-cases/issues/150)

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

3.1.1

- Fixed issue with Empty id marker leaking to test ids. Fixed [171](https://github.com/smarie/python-pytest-cases/issues/171)

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

Page 6 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.