Pytest-steps

Latest version: v1.8.0

Safety actively analyzes 628903 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 5

1.5.1

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](https://github.com/smarie/python-pytest-steps/issues/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](https://github.com/smarie/python-pytest-steps/issues/26)

1.5.0

`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](https://github.com/smarie/python-pytest-steps/issues/24).

Minor: `_get_step_param_names_or_default` moved to `steps` submodule.

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](https://github.com/smarie/python-pytest-steps/issues/22)

Minor:
- `steps_harvest_df_utils` submodule is now correctly listed in `__all__`.
- Improved docstrings and documentation page for API reference.

1.3.0

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](https://github.com/smarie/python-pytest-steps/issues/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 create_function 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

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.

1.2.0

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](https://github.com/smarie/python-pytest-steps/issues/21).

1.1.2

Fixed [20](https://github.com/smarie/python-pytest-steps/issues/20)

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.