Skip to content

Releases: approvals/ApprovalTests.Python

Rename 'Throttle' to 'Limit'

18 Dec 19:14
Compare
Choose a tag to compare
F!! rename 'throttle' to 'limit'

Co-Authored-By: Nitsan Avni <nitsanav@gmail.com>
Co-Authored-By: Susan Fung <38925660+susanfung@users.noreply.github.com>
Co-Authored-By: T. E. Green <78671457+Tegsy@users.noreply.github.com>
Co-Authored-By: Oliver Bestwalter <263007+obestwalter@users.noreply.github.com>

Throttling of reporters after 5

11 Dec 19:09
Compare
Choose a tag to compare

To avoid too many diff tools being launched, ApprovalTests will stop launching after the 5th time.
This is configurable in

GenericDiffReporter.throttling_threshold

MrJobApprovals accepts options

20 Nov 19:17
Compare
Choose a tag to compare

MrJobApprovals mistakenly did not allow you to pass options, it does not.

This is an api change, hence the minor version bump

Command Line Approvals

16 Oct 20:30
Compare
Choose a tag to compare

You can invoke a verify() call from the command line
This allows invoking python approvals from any other stack via subprocesses.

Usage:

python -m approvaltests --test-id hello --received "hello world!"

or

python -m approvaltests -t hello -r "hello world!"

or

echo "hello world!" | python -m approvaltests -t hello

Command Line Approvals

09 Oct 19:17
Compare
Choose a tag to compare

What

You can now easily verify command line outputs.

You can also pass inputs into the command line under test, including Iterables.

Why

This allows you to easily test non-python programs from ApprovalTests.

How

see example here

Split approval_utilities

05 Oct 18:32
Compare
Choose a tag to compare

Breaking Change

approval_utilities is becoming its own pypi package to allow usage in production code.

Fixes

You'll have some name spacing changes.

- from approvaltests.utilities.logger ...
+ from approval_utilities.utilities.logger ...

Split approval_utilities

05 Oct 18:26
Compare
Choose a tag to compare

Breaking Change

approval_utilities is becoming its own pypi package to allow usage in production code.

Fixes

You'll have some name spacing changes.

- from approvaltests.utilities.logger ...
+ from approval_utilities.utilities.logger ...

DateScrubber

02 Oct 18:52
Compare
Choose a tag to compare

You can now easily create a date scrubber.

For Example:

    verify("created at 03:14:15", options=Options().with_scrubber(DateScrubber.get_scrubber_for("00:00:00")))

will produce

created at <date0>

SimpleLogger log_to_string is thread safe

30 Sep 18:27
Compare
Choose a tag to compare

log_to_string, by default, now will log 1 string per thread. Allowing multithreaded testing

Extra utilities: verify_simple_logger, verify_storyboard, use_utc_timezone

21 Sep 15:07
Compare
Choose a tag to compare