Better unit test handling for #476