class 中的所有测试完成后是否有清理选项?

Is there an option to cleanup after ALL tests in class are complete?

我在测试中尝试了 deinit 方法 class,但它没有被调用。使用 Xcode 13.3

XCTestCase 有一个 class 方法 tearDown(),当 class 中的所有测试都完成时调用该方法:

override class func tearDown() {
   super.tearDown()
   // Cleanup
}