Enable use of the SpyAgency assertion methods without a TestCase.

Review Request #11028 — Created May 16, 2020 and submitted — Latest diff uploaded

Information

kgb
master

Reviewers

kgb

KGB 5.0 introduced new assertion methods in SpyAgency, which only
worked if mixing into a TestCase. This change improves upon this by
making these work even for a standalone SpyAgency, causing them to
just raise a standard AssertionError.

While consumers are unlikely to call these methods when not mixed into a
TestCase, an upcoming change will make use of these for some
sanity-checks.

There are also fixes for showing kwargs. Keys are now converted to
native strings, and are sorted. This helps with some unit test
discrepencies.

Unit tests passed.

Made use of this capability in an in-development change.

Commits

Files