[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABVgOSm=mrEwjTMy9TeGRwCnVqmEtJGiqSBiURQk7unfHYLH+g@mail.gmail.com>
Date: Thu, 3 Dec 2020 11:05:35 +0800
From: David Gow <davidgow@...gle.com>
To: Daniel Latypov <dlatypov@...gle.com>
Cc: Brendan Higgins <brendanhiggins@...gle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v2 2/4] kunit: tool: stop using bare asserts in unit test
On Thu, Dec 3, 2020 at 3:09 AM Daniel Latypov <dlatypov@...gle.com> wrote:
>
> Use self.assertEqual/assertNotEqual() instead.
> Besides being more appropriate in a unit test, it'll also give a better
> error message by show the unexpected values.
>
> Also
> * Delete redundant check of exception types. self.assertRaises does this.
> * s/kall/call. There's no reason to name it this way.
> * This is probably a misunderstanding from the docs which uses it
> since `mock.call` is in scope as `call`.
>
> Signed-off-by: Daniel Latypov <dlatypov@...gle.com>
> ---
Looks good, thanks!
Reviewed-by: David Gow <davidgow@...gle.com>
-- David
Powered by blists - more mailing lists