Currently we can register a cleanup function on a single test. This function is executed when the test finishes. But there is no way to execute a cleanup function after all the tests of a package are executed.
Use case: let's say I want to build a "test helper" library that is used by other projects in their tests. This library allocates some global resources that must be cleaned after all the tests in a package are executed. Yes it's possible to do it with TestMain. But it requires to declare it in each tested packages. It would be more convenient to be able to register a cleanup function from the "test helper" library. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/3f7d1270-a151-4c39-b382-883b9ee401fbn%40googlegroups.com.