Re: [PATCH v2 1/4] kunit: tool: fix unit test cleanup handling

2021-01-14 Thread Brendan Higgins
On Wed, Dec 2, 2020 at 11:09 AM Daniel Latypov wrote: > > * 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 Tested-by:

Re: [PATCH v2 1/4] kunit: tool: fix unit test cleanup handling

2020-12-02 Thread Daniel Latypov
On Wed, Dec 2, 2020 at 7:05 PM David Gow wrote: > > On Thu, Dec 3, 2020 at 3:09 AM Daniel Latypov wrote: > > > > * 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

Re: [PATCH v2 1/4] kunit: tool: fix unit test cleanup handling

2020-12-02 Thread David Gow
On Thu, Dec 3, 2020 at 3:09 AM Daniel Latypov wrote: > > * 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 > --- This patch

[PATCH v2 1/4] kunit: tool: fix unit test cleanup handling

2020-12-02 Thread Daniel Latypov
* 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 --- tools/testing/kunit/kunit_tool_test.py | 14 ++ 1 file changed, 6