Skip to content

Releases: smarie/python-pytest-cases

2.7.1 - `@pytest.mark.usefixtures` can be used on case functions

02 Dec 17:54
Compare
Choose a tag to compare
  • @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

02 Dec 12:39
Compare
Choose a tag to compare
  • 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 of parametrize now accepts a (possibly infinite) generator of ids, e.g. (f"foo{i}" for i in itertools.count()), just as pytest does. This was not always the case, inparticular when parametrizing a @fixture. The ids arguments of fixture_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

28 Nov 15:36
Compare
Choose a tag to compare
  • 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

26 Nov 13:04
Compare
Choose a tag to compare
  • is_lazy is now part of public API, and _LazyValue now has a cache mechanism like _LazyTuple. Fixes #143

  • @parametrize: custom ids are now correctly taken into account when a single lazy_valueis 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

13 Oct 10:06
Compare
Choose a tag to compare
  • 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-harvest#43

See documentation page for details.

2.2.5 - Marks are now correctly propagated from Case class

02 Oct 21:21
Compare
Choose a tag to compare
  • 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

01 Oct 16:49
Compare
Choose a tag to compare
  • 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`

24 Sep 16:15
Compare
Choose a tag to compare
  • Fixed TypeError: _idval() got an unexpected keyword argument 'item' with pytest versions between 3.0.0 and 3.7.4. Fixed #136

See documentation page for details.

2.2.2 - `@parametrize_with_cases` compatibility improvements

08 Sep 09:23
Compare
Choose a tag to compare
  • @parametrize_with_cases now supports that argnames 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

20 Aug 14:09
Compare
Choose a tag to compare
  • Now enforcing usage of makefun 1.9.3 or above to avoid issue AttributeError: 'functools.partial' object has no attribute '__module__' mentioned in #128

See documentation page for details.