def tearDown(self): if hasattr(self, 'window') and self.window is not None: self.window.close() del self.window DrawingImageTester.tearDown(self)