test_workflow documentation and code quality improvements

A few misc improvements. Also, I've made some assertion error messages more descriptive.