Releases: approvals/ApprovalTests.Python
Releases · approvals/ApprovalTests.Python
approvaltests-minimal: introducing a new pypi package
adding another pypi package that is released at the same time as the normal release:
- approvaltests - the standard release of approvaltests with all dependencies added by default
- approvaltests-minimal - the same release with none of the extra dependencies added, with the option to opt in to them individually
Allow minimal imports by lazy loading dependencies
The following dependencies are only needed if used
- BeautifulSoup4 in verify_html
- allpairspy in pairwise approvals
- pyperclip in clipboard reporter
Markdown Table
Better support for multiple approvals per test
- Better support for multiple approvals per test.
- Added
verify_exception
- [Exception utilities] (https://github.com/approvals/ApprovalTests.Python/tree/main/approvaltests/utilities/exceptions)
- Options supports
with_namer
- Note: this breaks backwards-combability with 5.1.0 by moving
multiline_string_utils
into a new namespace (approvals/utilities
)
Verifiable
You can now create Verifiable
objects, which know how to verify themselves. See:
Creating custom verify methods
Also added remove_indentation_from
.
Fixes for Pytest-Approvaltets package
- Better init.py for backwards compatibility
- PythonNativeReporter + PythonNative will resolve from ReporterFactory
Minor Linting
Fixed a few pylint complaints
Minor Linting + Structural Refactoring
This is only breaking if you Extend the Namer Classes.
Breaking Changes
Namer/NamerBase
Namer is now a pure interface and the abstract parts have been moved to NamerBase
Fix If you are extending approvaltests.core.Namer
you will probably want to extend approvaltests.namer.NamerBase
StactFrameNamer renames
- Directory -> directory
- MethodName -> method_name
- ClassName -> class_name
Verify Best covering Pairs
verify_best_covering_pairs
works the same as
verify_all_combinations
but with a much small set in some cases:
Table of reduction
This release add the allpairspy dependency
Scrubbing Existing Files
Breaking Features
- verify_file() will now scrub it if a scrubber is attached.
Note: If you scrub an existing file, it will be written as UTF8, instead of it's existing encoding - Removed Deprecated method verify_file_with_encoding(),
NOTE: if you call verify_file() instead, your code will work as before