Skip to content

Commit 0a5f7c7

Browse files
author
Sylvain MARIE
committed
3.3.0 changelog
1 parent 7d5941d commit 0a5f7c7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

docs/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
### 3.3.0 - Filter helpers and support for `pytest-asyncio` and other plugins
4+
5+
- 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)
6+
7+
- 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 !).
8+
39
### 3.2.1 - `@fixture` Bugfix
410

511
- 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)

pytest_cases/filters.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55

66
class CaseFilter(object):
77
"""
8-
This class represents a case filter. You can use it in order to filter cases
9-
to be used by `parametrize_by_cases`.
8+
This class represents a case filter. You can use it in order to filter cases to be used by `parametrize_by_cases`.
109
11-
You can join filters with the "and" relation by using & operator and join them
12-
by "or" relation using | operator.
13-
Moreover, you can negate a filter by using ~.
10+
`CaseFilter` implements logical operations "and" (`&`) "or" (`|`) and "not" (`~`). You can use it to define a
11+
composable filter from any callable receiving a single `case` argument and returning a boolean indicating if the
12+
`case` is selected.
1413
"""
1514

1615
def __init__(self, filter_function):

0 commit comments

Comments
 (0)