Pytest-blender

Latest version: v3.0.6

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

Scan your dependencies

Page 2 of 4

3.0.0

Breaking changes

- `addon_module_names` kwarg of [`install_addons_from_dir`] fixture has been renamed to `addons_ids`.

New features
- Add [CLI and configuration files options](https://github.com/mondeja/pytest-blender#configuration) for easier setup.

Enhancements

- Add environment variables propagation to Blender execution.
- Allow to test directly a Python package located inside the directory passed to [`blender-addons-dirs`] or [`install_addons_from_dir`] without zipping it previously.

Migration guide from v1 or v2

Most likely you don't need to use the fixtures [`install_addons_from_dir`], [`disable_addons`] and [`uninstall_addons`] because now you can define the addons to install using the [`blender-addons-dirs`] and [`blender-addons-cleaning`] configuration options:

- Replace [`install_addons_from_dir`] fixture by [`blender-addons-dirs`] configuration option.
- Replace [`disable_addons`] fixture by [`blender-addons-cleaning`] configuration option with `disable` value.
- Replace [`uninstall_addons`] fixture by [`blender-addons-cleaning`] configuration option with `uninstall` value, but is the default, so you don't need to define it.
- If you're installing the addons with [`install_addons_from_dir`] fixture in your *conftest.py* file but not removing them after the test suite execution, you can replace it by [`blender-addons-cleaning`] configuration option with the value `keep`.

* You can replace all the logging configuration of `logging.getLogger("pytest_blender")` by the [`pytest-blender-debug`] configuration option.

[`install_addons_from_dir`]: https://github.com/mondeja/pytest-blender#install_addons_from_dir
[`disable_addons`]: https://github.com/mondeja/pytest-blender#disable_addons
[`uninstall_addons`]: https://github.com/mondeja/pytest-blender#uninstall_addons
[`blender-addons-dirs`]: https://github.com/mondeja/pytest-blender#blender-addons-dirs
[`blender-addons-cleaning`]: https://github.com/mondeja/pytest-blender#blender-addons-cleaning
[`pytest-blender-debug`]: https://github.com/mondeja/pytest-blender#pytest-blender-debug

2.0.0

Breaking changes:

- The argument `recursive` has been removed from the [`install_addons_from_dir`](https://github.com/mondeja/pytest-blender#install_addons_from_dir) fixture.

Enhancements:

- Allow to install multiple file addons from `.zip` files with [`install_addons_from_dir`](https://github.com/mondeja/pytest-blender#install_addons_from_dir) fixture.

New features:

- Add [`blender_addons_dir`](https://github.com/mondeja/pytest-blender#blender_addons_dir) fixture to get the Blender's addons user directory.
- Add [`uninstall_addons`](https://github.com/mondeja/pytest-blender#uninstall_addons) fixture to remove the addons from Blender's addons user directory.

1.2.2

Bug fixes:

- Fixed error exiting Pytest test suite in v7.

Documentation:

- Document how to log the command executed by pytest-blender subprocess.

Chore:

- Officially stop supporting Python 3.6.

1.2.1

Bug fixes

- Prevent error when STDIN is pseudofile.

1.2.0

New features

- Added `recursive` argument to `install_addons_from_dir` fixture to discover addons through subdirectories.

Bug fixes

- Propagated interruption signals to Blender subprocess.

1.1.0

New features

- Add `--blender-template` argument to pass a custom startup file. See [Load startup template](https://github.com/mondeja/pytest-blender/blob/089a8e7a2aae73544591b4e8bb25bfe081212581/README.md#load-startup-template).

Enhancements

- Not necessarily require to pass addon names to install them. See [`install_addons_from_dir` function documentation](https://github.com/mondeja/pytest-blender/blob/089a8e7a2aae73544591b4e8bb25bfe081212581/README.md#install_addons_from_dir).
- Raise `ValueError` if no addons passed to install to `install_addons_from_dir` fixture.

Bug fixes

- Properly propagate command line arguments to `pytest`, `blender` and `python` binaries. See [Arguments propagation](https://github.com/mondeja/pytest-blender/blob/089a8e7a2aae73544591b4e8bb25bfe081212581/README.md#arguments-propagation).

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.