More unittest performance improvements.