Separate test code from test cases in pytest.
BSD-3-CLAUSE License
Bot releases are visible (Hide)
Published by smarie over 4 years ago
Better support for pytest.param
in parametrize_plus
and also in fixture_union
and fixture_param[s]
. Improved corresponding ids. Fixed #79 and #86
New @ignore_unused
decorator to protect a fixture function from the "NOT_USED" case happening when the fixture is used in a fixture union.
Removed six
, wrapt
and enum34
dependencies
(Internal) submodules reorganization for readability
(Internal) suppressed a lot of code quality warnings
See documentation page for details.
Published by smarie over 4 years ago
Fixed ids
precedence order when using pytest.mark.parametrize
in a fixture_plus
. Fixed #87
Fixed issue with fixture_union
when using the same fixture twice in it. Fixes #85
Added the possibility to pass a hook
function in all API where fixtures are created behind the scenes, so as to ease debugging and/or save fixtures (with stored_fixture
from pytest harvest). Fixes #83
Fixture closures now support reordering when no unions are present. This suppressed the annoying warning "WARNING the new order is not taken into account !!" when it was not relevant. Fixes #81
See documentation page for details.
Published by smarie over 4 years ago
setup.py
. In particular removed dependency to six
for setup and added py.typed
file. Fixes #78
See documentation page for details.
Published by smarie over 4 years ago
@cases_generator
now has a default value for the names
template, based on the parameters. Fixes #77.
See documentation page for details.
Published by smarie over 4 years ago
Fixed ValueError
when a product of unions was used on a test node, for example when two parametrize_plus
using fixture_ref
s were used on the same fixture or test function. Fixed #76
See documentation page for details.
Published by smarie over 4 years ago
Improved error message when something that is not a fixture is used in unpack_fixture
or fixture_union
. Fixed #75
See documentation page for details.
Published by smarie over 4 years ago
Fixed deprecation warning #74
See documentation page for details.
Published by smarie over 4 years ago
Now using module name and not file path to detect symbols in cases files that are imported from elsewhere and not created locally. Indeed that was causing problems on some ^platforms where a .pyc
cache file is created. Fixes #72
Fixed PluginValidationError
when pytest_fixture_plus
or pytest_parametrize_plus
were used in a conftest.py
file. Fixes #71. According to discussion in pytest#6475, pytest_fixture_plus
and pytest_parametrize_plus
are now renamed to fixture_plus
and parametrize_plus
in order for pytest (pluggy) not to think they are hooks. Old aliases will stay around for a few versions, with a deprecation warning.
See documentation page for details.
Published by smarie almost 5 years ago
Improved test ids for the cases where fixture_ref
is used in the parameters list in @pytest_parametrize_plus
. Fixed #69. Thanks last-partizan
for the suggestion !
Fixed TypeError: got an unexpected keyword argument 'indirect'
with pytest
5+. Fixed #70.
See documentation page for details.
Published by smarie almost 5 years ago
FixtureClosureNode
is now able to properly handle ignore_args
, and now supports that plugins append fixtures to the closure, such as pytest-asyncio. Added corresponding tests. Fixes #68
See documentation page for details.
Published by smarie almost 5 years ago
Fixed KeyError
issue happening when a fixture is not found. Now users will see the "normal" error message from pytest ("fixture <name> not found"
). Fixed #67.
See documentation page for details.
Published by smarie almost 5 years ago
Fixed ValueError
issue happening with indirectly parametrized fixtures. Fixed #64.
See documentation page for details.
Published by smarie almost 5 years ago
raddessi added a pyproject.toml
- thanks! Fixed #65.
See documentation page for details.
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.
Published by smarie about 5 years ago
Fixed issue happening with @pytest.mark.parametrize
with python 2. Fixed #62.
See documentation page for details.
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.
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.
Published by smarie about 5 years ago
It was missing from setup.py
.
See documentation page for details.
Published by smarie about 5 years ago
Fixes #47.
See documentation page for details.
Published by smarie over 5 years ago
Fixed #52.
See documentation page for details.