Skip to content

Releases: smarie/python-pytest-steps

1.5.3 - Bug fix

08 Jan 09:45
Compare
Choose a tag to compare

Fixed plugin initialization error when pytest_harvest is not present. Fixed #29.

See documentation page for details.

1.5.2 - Bug fix

07 Jan 21:42
Compare
Choose a tag to compare

pytest_harvest is not anymore required for install. Fixed #28.

See documentation page for details.

1.5.1 - Bug fix and exceptions improvement

19 Dec 14:34
Compare
Choose a tag to compare

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

18 Dec 16:22
Compare
Choose a tag to compare

@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.

18 Dec 13:26
Compare
Choose a tag to compare

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`

17 Dec 20:54
Compare
Choose a tag to compare

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 into handle_steps_in_results_dct (old alias is kept for this version). Renamed parameter raise_if_no_step to raise_if_one_test_without_step_id. Added a parameter keep_orig_id, by default (True) the original test id is kept for reference. Another parameter no_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 than handle_steps_in_results_dct but directly on the synthesis dataframe. The parameters are almost the same.
  • New method flatten_multilevel_columns to diretly apply get_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 an error_if_not_present parameter

See documentation page for details.

1.2.1 - Alignment with pytest-harvest 1.2.1

13 Dec 17:03
Compare
Choose a tag to compare

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.

27 Nov 15:51
Compare
Choose a tag to compare

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

21 Nov 15:04
Compare
Choose a tag to compare

1.1.1 - fixed ordering issue in generator mode

20 Nov 20:18
Compare
Choose a tag to compare

Fixed a pytest ordering issue in generator mode, by relying on place_as. Fixed #18.

See documentation page for details.