improve unit tests

This should help with #35 and #36.
Reports AssertionErrors as test failures now, instead of timing out.