Use some more informative asserts in inprocess kernel tests

Prompted by gh-6552 (but doesn't fix it)
Merge pull request #6556 from takluyver/inproc-kernel-tests-better-assets

Use some more informative asserts in inprocess kernel tests