This adds a "test.asserts" module that currently just provides a convenient way to assert on the content of warnings. By default all tests will assert that no warnings are given.
Fixes #1682
PR #1329