Releases: smarie/python-pytest-cases
2.7.1 - `@pytest.mark.usefixtures` can be used on case functions
@pytest.mark.usefixtures
can be now be used on case functions. Fixes #152.
See documentation page for details.
2.6.0 - better cache for lazy values and support for infinite id generators
-
lazy_value
parameters are now cached by pytest node id only. So plugins can access the value without triggering an extra function call, but a new call is triggered for each pytest node, so as to prevent mutable object leakage across tests. Fixed #149 while ensuring no regression for #143. -
The
ids
argument ofparametrize
now accepts a (possibly infinite) generator of ids, e.g. (f"foo{i}" for i in itertools.count()
), just aspytest
does. This was not always the case, inparticular when parametrizing a@fixture
. Theids
arguments offixture_union
,param_fixture[s]
, etc. now also support this pattern. Fixed #148
See documentation page for details.
2.5.0 - case ids `glob` match improvements
- Improved description for the
glob
argument in@parametrize_with_cases
. Also made the implementation escape all regex special characters so that they can't be used. Finally a pattern should now match the entire case id (previously, a partial match would work if it was at the beginning of the string). One step towards #147
See documentation page for details.
2.4.0 - various fixes for test ids and lazy values
-
is_lazy
is now part of public API, and_LazyValue
now has a cache mechanism like_LazyTuple
. Fixes #143 -
@parametrize
: customids
are now correctly taken into account when a singlelazy_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. -
Empty case ids are now replaced with
'<empty_case_id>'
to avoid ambiguous interpretation of test ids. Fixes #142.
See documentation page for details.
2.3.0 - better `LazyValue` internal API
- new
clone(self, remove_int_base=False)
API onLazyValue
andLazyTupleItem
instances. With this new API, on oldpytest
< 5.3
, other plugins such aspytest-harvest
can easily clone the contents from lazy values without having them inherit fromint
- which was a dirty hack used bypytest-cases
to trickpytest
to generate acceptable test ids in these old pytest versions. Also improved theLazyValue
,LazyTuple
andLazyTupleItem
object model with equality and repr. Fixes pytest-harvest#43
See documentation page for details.
2.2.5 - Marks are now correctly propagated from Case class
- Marks set on a case class are now propagated to cases in the class. So you can use for example
pytest-pilot
more easily ! Fixes #139
See documentation page for details.
2.2.4 - Fixes issue
- Fixed "Created fixture names are not unique, please report" error when duplicate fixture reference is provided in a pytest.param. Fixes #138.
See documentation page for details.
2.2.3 - Fixed issue with pytest `3.X`
- Fixed
TypeError: _idval() got an unexpected keyword argument 'item'
withpytest
versions between 3.0.0 and 3.7.4. Fixed #136
See documentation page for details.
2.2.2 - `@parametrize_with_cases` compatibility improvements
@parametrize_with_cases
now supports thatargnames
is a list or tuple, just as@pytest.mark.parametrize
does. PR #132, by@saroad2
.
See documentation page for details.
2.2.1 - setup.py fix to enforce dependency version
- Now enforcing usage of
makefun
1.9.3 or above to avoid issueAttributeError: 'functools.partial' object has no attribute '__module__'
mentioned in #128
See documentation page for details.