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.11.6 - pyproject.toml

Published by smarie almost 5 years ago

raddessi added a pyproject.toml - thanks! Fixed #65.

See documentation page for details.

python-pytest-cases - 1.11.5 - bugfix

Published by smarie almost 5 years ago

pytest_parametrize_plus was not working correctly with test classes, leading to fixture 'self' not found. Fixed #63.

See documentation page for details.

python-pytest-cases - 1.11.4 - python 2 bugfix

Published by smarie about 5 years ago

Fixed issue happening with @pytest.mark.parametrize with python 2. Fixed #62.

See documentation page for details.

python-pytest-cases - 1.11.3 - minor improvements

Published by smarie about 5 years ago

Better error message when users use THIS_MODULE in cases= instead of module=.

Added __version__ package-level attribute.

See documentation page for details.

python-pytest-cases - 1.11.2 - Increased tolerance to other plugins + bugfix

Published by smarie about 5 years ago

Now when other plugins try to manipulate the fixture closure, warning messages are emitted but no error is raised. Fixed #55.

Also fixed issue #58 happening with doctest.

See documentation page for details.

python-pytest-cases - 1.11.1 - Added `six` dependency explicitly

Published by smarie about 5 years ago

It was missing from setup.py.

See documentation page for details.

python-pytest-cases - 1.11.0 - `fixture_ref` can now be used inside tuples, leading to cross-products

Published by smarie about 5 years ago

Fixes #47.

See documentation page for details.

python-pytest-cases - 1.10.1 - Bugfix

Published by smarie over 5 years ago

Fixed #52.

See documentation page for details.

python-pytest-cases - 1.10.0 - New feature: fixtures unpacking

Published by smarie over 5 years ago

You can now unpack a fixture iterable into several individual fixtures using unpack_fixture or using @pytest_fixture_plus(unpack_into=<names>). This is also available in union_fixture(unpack_into=<names>). Fixed #50 and #51.

See documentation page for details.

python-pytest-cases - 1.9.3 - Bugfix

Published by smarie over 5 years ago

Fixed issues when parametrize argnames contains a list. This fixed #49

See documentation page for details.

python-pytest-cases - 1.9.2 - Bugfix with pytest 3.7

Published by smarie over 5 years ago

Fixed #48.

See documentation page for details.

python-pytest-cases - 1.9.1 - Bugfix

Published by smarie over 5 years ago

Fixed #48.

See documentation page for details.

python-pytest-cases - 1.9.0 - New `--with-reorder` commandline option

Published by smarie over 5 years ago

New commandline option '--with-reorder' to change the reordering startegy currently in application. Fixes #45.

The --with-reorder "skip" mode was not working correctly in presence of marks, fixed it. Fixed #46.

See documentation page for details.

python-pytest-cases - 1.8.1 - BugFixes

Published by smarie over 5 years ago

Ids should not be used when setting a NOT_USED parametrization. Fixes #43

Fixed issue with ordering and setup/teardown for higher-level scope fixtures (session and module scopes) when using union fixtures. Fixes #44

See documentation page for details.

python-pytest-cases - 1.8.0 - Better ids for fixture unions

Published by smarie over 5 years ago

New:

  • fixture_union now accept a non-None value for ids. It also has a new idstyle argument allowing users to change the style of ids used. Finally pytest_parametrize_plus relies on this ids argument to set a more readable list of ids for the created union. Fixes #41.

Misc:

  • Added non-regression test for fixture order. It passes already for all recent pytest versions (after 3.3). Fixes #42

See documentation page for details.

New decorator @pytest_parametrize_plus able to handle the case where a fixture_ref(<fixture_name>) is present in the parameter values list. This decorator can be applied both on test functions and fixtures (if they are decorated with @pytest_fixture_plus). Fixes #40

Major refactoring of the "union fixtures" mechanism.

  • The NOT_USED status is now correctly propagated between dependent fixtures. This should fix a few cases where user fixtures were setup/teardown while not used in the current test node.
  • Empty fixture unions are not permitted anymore.
  • The way unions are handled in test parametrization was redesigned. The new design is based on a two-steps approach: first build the fixture closure for each node as a tree (and not a list as in pytest), and then apply parametrization intelligently based on this tree structure. This fixes several unintuitive behaviours that were happening with unions.

Note: interestingly this also fixes pytest#5054.

See documentation page for details.

python-pytest-cases - 1.6.3 - Minor exception enhancement

Published by smarie over 5 years ago

Improved the error message when the name template is wrong in @cases_generator. Fixes #39.

See documentation page for details.

python-pytest-cases - 1.6.2 - bug fixes

Published by smarie over 5 years ago

fixture_union:

  • Changed the repr of NOT_USED to pytest_cases.NOT_USED.

  • @pytest_fixture_plus now correctly handles the NOT_USED when fixtures in the union do not contain any parameter. Fixes #38.

param_fixtures:

  • param_fixtures now delegates to param_fixture when a single parameter name is provided. This is more consistent. Fixed #36.

  • param_fixture[s] now support all arguments from fixture (scope and autouse in particular).

See documentation page for details.

python-pytest-cases - 1.6.1 - `@pytest_fixture_plus` improvement to handle `NOT_USED` cases

Published by smarie over 5 years ago

Fixed issue where fixtures get called with NOT_USED as a parameter when using a fixture_union. This issue is actually only fixed in @pytest_fixture_plus, if you use @pytest.fixture you have to handle it manually. Fixes #37

See documentation page for details.

python-pytest-cases - 1.6.0 - `fixture_union` and `param_fixture[s]` bugfix

Published by smarie over 5 years ago

New fixture_union method to create a fixture that is the union/combination of other fixtures. This is an attempt to solve this pytest proposal.

Also, param_fixture and param_fixtures can now be used without necessarily storing the return value into a variable: they will automatically register the created fixtures in the calling module.

Finally, fixed a bug with param_fixtures when called to create a fixture for a single parameter.

See documentation page 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