python-pytest-cases

Separate test code from test cases in pytest.

BSD-3-CLAUSE License

Downloads
658.7K
Stars
344
Committers
14

Bot releases are hidden (Show)

python-pytest-cases - 1.5.1 - `param_fixtures` bugfix

Published by smarie over 5 years ago

Fixed param_fixtures issue: all parameter values were identical to the last parameter of the tuple. Fixes #32.

See documentation page for details.

python-pytest-cases - 1.5.0 - new helpers `param_fixture` and `param_fixtures`

Published by smarie over 5 years ago

Following Sup3rGeo's proposal, introduced two helper methods to create simple "parameter fixtures". Fixes #31

See documentation page for details.

python-pytest-cases - 1.4.2 - parametrized `@pytest_fixture_plus` minor bug fix

Published by smarie over 5 years ago

@pytest_fixture_plus now correctly honors parameter id and marks overriden at single parameter level using pytest.param. Fixed #30

See documentation page for details.

python-pytest-cases - 1.4.1 - parametrized `@pytest_fixture_plus` minor bug fix

Published by smarie over 5 years ago

Fixed @pytest_fixture_plus in case it is used with parametrize and one parameter is itself customized using pytest.param. Fixed #29.

See documentation page for details.

python-pytest-cases - 1.4.0 - `@pytest_fixture_plus` major improvement

Published by smarie over 5 years ago

  • Major improvement of @pytest_fixture_plus: instead of generating fixtures, it now correctly parametrizes the fixture. Skip/fail Marks are correctly copied too. Fixes #28

  • pytest_fixture_plus does not accept the params and ids arguments any more, it only relies on parametrization marks.

See documentation page for details.

python-pytest-cases - 1.3.3 - parametrized `@pytest_fixture_plus` Bugfix

Published by smarie over 5 years ago

Fixed minor bug with parametrized @pytest_fixture_plus: spaces are now correctly removed when multiple parameter names are provided in the same parametrize call. Fixes #27

See documentation page for details.

python-pytest-cases - 1.3.2 - parametrized `@pytest_fixture_plus` Bugfix

Published by smarie over 5 years ago

Fixed bug with @pytest_fixture_plus when used in parametrized mode. Fixes #26. Thanks Sup3rGeo!

See documentation page for details.

python-pytest-cases - 1.3.1 - Minor dependency change

Published by smarie over 5 years ago

Now using decopatch to create the decorators.

See documentation page for details.

python-pytest-cases - 1.3.0 - More flexible case generators names + Minor dependency change

Published by smarie over 5 years ago

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.

python-pytest-cases - 1.2.2 - fixed bug with marks on cases with pytest 3.3

Published by smarie over 5 years ago

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.

python-pytest-cases - 1.2.1 - fixed id of test cases with marks

Published by smarie over 5 years ago

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

See documentation page for details.

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.

python-pytest-cases - 1.1.1 - Improved generated fixture names for `@pytest_fixture_plus`

Published by smarie almost 6 years ago

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.

python-pytest-cases - 1.1.0 - New `@pytest_fixture_plus`

Published by smarie almost 6 years ago

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.

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

Published by smarie almost 6 years ago

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.

Package Rankings
Top 2.23% on Pypi.org
Top 29.85% on Conda-forge.org
Badges
Extracted from project README
Python versions Build Status Tests Status Coverage Status codecov Flake8 Status Documentation PyPI Downloads Downloads per week GitHub stars DOI