Screenpy

Latest version: v4.2.5

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

Scan your dependencies

Page 1 of 8

4.2.5

------------------

New Features

- Added a new `Stop` Action, which can take a Question and Resolution and will stop the test until that assertion is true (or a timeout is reached). Or just `Stop()` and it will wait until you press enter.

Bug Fixes

- The typehint for the `Matches` Resolution now includes re.compile objects.
- `..._to_log` methods are now all property-ized, which fixes a few logging errors.

Development Niceties

- Pruned the Sphinx directives because they don't need to be as long as i thought they did.
- Slimmed down the documentation by noting method aliases in the method's docstring and excluding the aliases from the documentation (since thye're copies of the original method).

4.2.4

------------------

Bug Fixes

- `MakeNote` now correctly logs what key the Actor is jotting something down under.

Improvements

- We now make use of the `Self` type from `typing_extensions`, to better type-hint subclassed entites in ScreenPy.

Development Niceties

- Did quite a lot of project standardization (big big thanks bandophahita!).

4.2.3

------------------

Improvements

- Updated all the dependencies to be more up-to-date!
- Specifically updated Pydantic to use the new Pydantic-Settings module for settings management. Waaay slicker.

4.2.2

------------------

New Features

- A new `Either` Action! For those times where you might want to do one thing or a different thing depending on the current state of the application. Or any other way to use it you can think of!

Improvements

- Almost all the improvements this time were clerical: improved the docs setup, added linting to the tests, add `ruff`...q
- Added some logic to better represent the values from the test in the Narrator's logs (thanks bandophahita!).
- Added support for Python 3.12!
- Fixed several typing issues.

Bug Fixes

- Fixed an issue where `Silently` wasn't correctly wrapping Describables, so the wrong message was being read by the Narrator (thanks bandophahita!).
- Fixed some cases where `beat` *should* be logging `None` but wasn't, and then fixed a bug with that where it was logging `None` too often if `from __future__ import annotations` was at the top of the file (thanks again, bandophahita!).
- Fixed an issue where `Eventually` would log multiple of the same exceptions. We actually completely reworked the logic here to make things much easier to read (thanks again again, bandophahita!).

4.2.1

------------------

Bug Fixes

- `ContainsTheEntry` was still inheriting from `BaseResolution`, even after the deprecation (thanks for the issue, jardilac91!). No longer!

4.2.0

------------------

Deprecations

- `BaseResolution` is now deprecated in favor of the new `Resolvable` protocol. No longer are Resolutions the odd-duck of ScreenPy, now they behave the same as Actions (`Performable`) and Questions (`Answerable`)! See the [deprecations page entry](https://screenpy-docs.readthedocs.io/en/latest/deprecations.html#id1) for more information.
- As foretold, the `has_cleanup_tasks` method of `Actor` has been removed. Er, what do you mean i forgot to mention it last year when it was deprecated?? Well hopefully you saw the warning! 😬

New Features

- Actors are now callable, and-
- There are now present-tense aliases for all Actions, so you can do `the_actor(Sees(This(), IsCool()))`! Well except that `This` is not a Question and `IsCool` is not a Resolution... unless you make them!
- Added `Silently` "Action" (more of an Adverb, really). This wrapper silences all narration for the -ables contained within. No Actions, Questions, or Resolutions will be narrated inside of `Silently`!
- Added `Log` Action to log the answer to a Question real quick. Could be useful during debugging.

Improvements

- Almost everything you could want from ScreenPy is now available from the top-level. Now instead of doing `from screenpy.actions import ...`, `from screenpy.resolutions import...`, you can just do it all using `from screenpy import ...` in one block! You can still do the old way if you want, but now you can do it this way, too!
- `SeeAnyOf` and `SeeAllOf` now behave consistently with each other and consistently with how one might expect `and` and `or` to behave. They both accept 0 tests (and pass), they both allow 1 test, and they both short-circuit their testing. They also handle narrating plurals better!
- Settings now use Pydantic, and are much, MUCH better! You can set settings for ScreenPy through environment variables, through pyproject.toml, or in a conftest.py file. Checkout the updated [Settings documentation](https://screenpy-docs.readthedocs.io/en/latest/settings.html) for details!

Bug Fixes

- `Eventually` now preserves the *order* of the errors it encounters, which will make debugging much easier.
- `Eventually` now correctly sets both poll rate and timeout in the same call, if you want to do that sort of thing.
-

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.