Error leaving test code