Releases: smarie/python-pytest-steps
1.5.3 - Bug fix
Fixed plugin initialization error when pytest_harvest
is not present. Fixed #29.
See documentation page for details.
1.5.2 - Bug fix
pytest_harvest
is not anymore required for install. Fixed #28.
See documentation page for details.
1.5.1 - Bug fix and exceptions improvement
We now detect that @cross_step_fixture
or @one_fixture_per_step
is applied on a fixture with the wrong scope, and raise a much more readable exception. Fixes #25.
Improved pivot_steps_on_df
so that we can use a filter on it, and so that only cross-step fixtures are used in the default cross-step columns. Fixes #26
See documentation page for details.
1.5.0 - New `@cross_steps_fixture` decorator
@one_per_step
renamed @one_fixture_per_step
for clarity. Old alias will remain across at least one minor version.
New @cross_steps_fixture
decorator to declare that a function-scoped fixture should be created once and reused across all steps. This decorator and the already existing decorator @one_fixture_per_step
provide a consistent and very intuitive way for users to declare how fixtures should behave in presence of steps. Fixes #24.
Minor: _get_step_param_names_or_default
moved to steps
submodule.
See documentation page for details.
1.4.0 - Documentation + Possibility to call a decorated test function manually.
New features:
- It is now possible to call a test function decorated with
@test_steps
manually, for example to run it once at the beinning of a test session in order for all imports to be done before actual execution. Fixes #22
Minor:
steps_harvest_df_utils
submodule is now correctly listed in__all__
.- Improved docstrings and documentation page for API reference.
See documentation page for details.
1.3.0 - Default fixtures for `pytest-harvest`
When steps are present, we now offer session_results_df_steps_pivoted
and module_results_df_steps_pivoted
default fixtures, to align with pytest-harvest
>= 1.1 default fixtures session_results_df
and module_results_df
. Fixes #23.
Improved API to manipulate pytest-harvest
results objects in presence of steps:
- Renamed
handle_steps_in_synthesis_dct
intohandle_steps_in_results_dct
(old alias is kept for this version). Renamed parameterraise_if_no_step
toraise_if_one_test_without_step_id
. Added a parameterkeep_orig_id
, by default (True) the original test id is kept for reference. Another parameterno_steps_policy
allows users to make the method transparent if no steps are found. - new method
handle_steps_in_results_df
to perform the same things thanhandle_steps_in_results_dct
but directly on the synthesis dataframe. The parameters are almost the same. - New method
flatten_multilevel_columns
to diretly applyget_flattened_multilevel_columns
on the columns of a dataframe pivot_steps_on_df
now has the ability to detect parameter and fixture names from the provided pytest session, so as not to pivot them (they should be stable across steps). It also provides anerror_if_not_present
parameter
See documentation page for details.
1.2.1 - Alignment with pytest-harvest 1.2.1
pytest-harvest
1.2 provides default fixtures and fixes a few issues in the synthesis dictionary (in particular fixture and fixture parameters were overlapping each other). We aligned pytest-steps
to leverage it.
Also, minor improvement: the unique id internally generated for each test now includes the pytest object. In practice this does not change anything for most use cases, but it might allow later refactoring, and better diagnostics.
See documentation page for details.
1.2.0 - Internal refactoring: we now use a more robust method to identify tests that are steps of the same test.
This fixes some bugs that were happening on edge cases where several parameters had the same string id representation (or one was a substring of the other). Fixed #21.
See documentation page for details.
1.1.2 - pytest-harvest is now an optional dependency
Fixed #20
See documentation page for details.
1.1.1 - fixed ordering issue in generator mode
Fixed a pytest ordering issue in generator mode, by relying on place_as. Fixed #18.
See documentation page for details.