Skip to content

1.3.0 - Default fixtures for `pytest-harvest`

Choose a tag to compare

@smarie smarie released this 17 Dec 20:54
· 91 commits to main since this release

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.