[PATCH v2 3/4] kunit: tool: use `with open()` in unit test