Detect leakage of error_reporting state in tests.