Enable use of the SpyAgency assertion methods without a TestCase.

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

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.

Summary ID
Enable use of the SpyAgency assertion methods without a TestCase.
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.
5f8bcf49d7ffb6f2c3415cb09ea6e4bd94e3b871
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (60ac013)
Loading...