diff options
author | Daniel Latypov <dlatypov@google.com> | 2020-12-02 20:08:21 +0100 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2021-02-08 23:33:32 +0100 |
commit | cfd607e43da4a20753744f134e201310262b827a (patch) | |
tree | 6d54478b251218123d18a0cae109e90a6b40f314 /virt | |
parent | Linux 5.11-rc7 (diff) | |
download | linux-cfd607e43da4a20753744f134e201310262b827a.tar.xz linux-cfd607e43da4a20753744f134e201310262b827a.zip |
kunit: tool: fix unit test cleanup handling
* Stop leaking file objects.
* Use self.addCleanup() to ensure we call cleanup functions even if
setUp() fails.
* use mock.patch.stopall instead of more error-prone manual approach
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Acked-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions