Reason: test may contain cleanup at the endwhich is needed for GC to work properly, but is not done if test fails. With collectgarbage() in former position it would crash when collecting garbage.