Releases: smarie/python-pytest-cases
3.0.0 - harmonization of ids and public API for cases info
-
Major refactoring of the way ids and marks are generated and customized in
fixture_union,@parametrizeand@parametrize_with_cases. Nowidstylehas a consistent behaviour across the board,idsandidstylecan work together correctly,@parametrize_with_casesand@parametrizehave much better default values for ids, and many others. See documentation for details. Fixed #154 -
New public API to manipulate information about a case function:
copy_case_info,set_case_id,get_case_id,get_case_marks,get_case_tags,matches_tag_query,is_case_class,is_case_function. See API reference. -
Fixed default behaviour of
idgenin@parametrize: it only defaults toAUTOwhen nofixture_refare used in the argvalues.
See documentation page for details.
2.7.2 - Bugfix with doctest
- Fixed
AttributeError: 'DoctestItem' object has no attribute '_request'when executing doctests. Fixes #156
See documentation page for details.
2.7.1 - `@pytest.mark.usefixtures` can be used on case functions
@pytest.mark.usefixturescan 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_valueparameters 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
idsargument ofparametrizenow accepts a (possibly infinite) generator of ids, e.g. (f"foo{i}" for i in itertools.count()), just aspytestdoes. This was not always the case, inparticular when parametrizing a@fixture. Theidsarguments 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
globargument 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_lazyis now part of public API, and_LazyValuenow has a cache mechanism like_LazyTuple. Fixes #143 -
@parametrize: customidsare now correctly taken into account when a singlelazy_valueis used for a tuple of parameters. This issue could be seen also with@parametrize_with_cases:idgendoes 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 onLazyValueandLazyTupleIteminstances. With this new API, on oldpytest< 5.3, other plugins such aspytest-harvestcan easily clone the contents from lazy values without having them inherit fromint- which was a dirty hack used bypytest-casesto trickpytestto generate acceptable test ids in these old pytest versions. Also improved theLazyValue,LazyTupleandLazyTupleItemobject 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-pilotmore 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'withpytestversions between 3.0.0 and 3.7.4. Fixed #136
See documentation page for details.