New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add async support for class tearDown() function #415
Comments
Sorry for the late reply. If you are blocked on a solution here, consider using func testWhatever() {
addTeardownBlock {
await someTeardownWork()
}
XCTAssertTrue(whatever())
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While we now have async versions of the per-test
setUp()
andtearDown()
functions, we don't yet have an async version of the class-widetearDown()
. Adding this would allow tests that are able to ensure that any artifacts left behind by the main testing are cleaned up before the test suite ends:I've tried using a
Task()
and a semaphore in the classtearDown()
, but the task gets terminated early when the main test program exits.The text was updated successfully, but these errors were encountered: