Close figures in test script