Skip to content

Releases: smarie/python-pytest-cases

1.3.1 - Minor dependency change

12 Mar 16:57
Compare
Choose a tag to compare

Now using decopatch to create the decorators.

See documentation page for details.

1.3.0 - More flexible case generators names + Minor dependency change

12 Mar 10:07
Compare
Choose a tag to compare

Cases generators can now support explicit name lists, and name generator callables, in addition to the name template strings. Fixed #24

Dependency to decorator has been dropped and replaced with makefun. Fixed #25.

See documentation page for details.

1.2.2 - fixed bug with marks on cases with pytest 3.3

02 Feb 14:00
Compare
Choose a tag to compare

Marks on cases are now also working with pytest 3.3. Fixed #23

Ids for marked tests are now better managed. A new function get_pytest_parametrize_args is now used to transform the list of cases obtained by get_all_cases(module), into the list of marked cases and ids required by @pytest.mark.parametrize. The doc has been updated to explain this for advanced users wishing to perform this step manually.

See documentation page for details.

1.2.1 - fixed id of test cases with marks

01 Feb 17:46
Compare
Choose a tag to compare

Id of test cases with marks was appearing as ParameterSet. Fixed it.

See documentation page for details.

1.2.0 - @pytest.mark can be used on cases + @pytest_fixture_plus parametrization order bugfix

01 Feb 15:56
Compare
Choose a tag to compare

Pytest marks such as @pytest.mark.skipif can now be used on case functions. As a consequence, get_all_cases is now the recommended function to use instead of extract_cases_from_module to perform manual collection. Indeed get_all_cases correctly prepares the resulting parameters list so that pytest sees the marks. Fixed #21

Fixed parametrization order when @pytest_fixture_plus is used with several @pytest.mark.parametrize. Fixed #22.

See documentation page for details.

1.1.1 - Improved generated fixture names for `@pytest_fixture_plus`

08 Jan 12:58
Compare
Choose a tag to compare

When @pytest_fixture_plus is used on a function marked as parametrized, some fixtures are generated (one for each parameter). Generated fixture names now follow the pattern <fixturename>__<paramname>.
Fixed #20.

See documentation page for details.

1.1.0 - New `@pytest_fixture_plus`

08 Jan 10:16
Compare
Choose a tag to compare

New decorator @pytest_fixture_plus allows to use several @pytest.mark.parametrize on a fixture. Therefore one can use multiple @cases_data decorators, too. Fixes #19.
Note: this is a temporary feature, that will be removed if/when pytest supports it.

See documentation page for details.

1.0.0 - `@cases_fixture` + pytest 2.x support

22 Nov 15:26
Compare
Choose a tag to compare

Pytest 2.x is now supported. Fixes #14

New feature: @cases_fixture ! Now you can put your cases data retrieval in a fixture so that its duration does not enter into the test duration. This is particularly interesting if you use pytest-harvest to create benchmarks: you probably do not want the case data retrieval/parsing to be counted in the test duration, especially if you use caching on the case function to accelerate subsequent retrievals. Fixes #15

See documentation for details.