From: David Gow <davidgow@google.com>
To: Daniel Latypov <dlatypov@google.com>
Cc: Brendan Higgins <brendanhiggins@google.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v2 2/4] kunit: tool: stop using bare asserts in unit test
Date: Thu, 3 Dec 2020 11:05:35 +0800 [thread overview]
Message-ID: <CABVgOSm=mrEwjTMy9TeGRwCnVqmEtJGiqSBiURQk7unfHYLH+g@mail.gmail.com> (raw)
In-Reply-To: <20201202190824.1309398-2-dlatypov@google.com>
On Thu, Dec 3, 2020 at 3:09 AM Daniel Latypov <dlatypov@google.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@google.com>
> ---
Looks good, thanks!
Reviewed-by: David Gow <davidgow@google.com>
-- David
next prev parent reply other threads:[~2020-12-03 3:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 19:08 [PATCH v2 1/4] kunit: tool: fix unit test cleanup handling Daniel Latypov
2020-12-02 19:08 ` [PATCH v2 2/4] kunit: tool: stop using bare asserts in unit test Daniel Latypov
2020-12-03 3:05 ` David Gow [this message]
2021-01-14 22:22 ` Brendan Higgins
2020-12-02 19:08 ` [PATCH v2 3/4] kunit: tool: use `with open()` " Daniel Latypov
2020-12-03 3:06 ` David Gow
2021-01-14 22:19 ` Brendan Higgins
2020-12-02 19:08 ` [PATCH v2 4/4] minor: kunit: tool: fix unit test so it can run from non-root dir Daniel Latypov
2020-12-03 3:06 ` David Gow
2021-01-14 22:15 ` Brendan Higgins
2020-12-03 3:05 ` [PATCH v2 1/4] kunit: tool: fix unit test cleanup handling David Gow
2020-12-03 5:15 ` Daniel Latypov
2021-01-14 22:24 ` Brendan Higgins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABVgOSm=mrEwjTMy9TeGRwCnVqmEtJGiqSBiURQk7unfHYLH+g@mail.gmail.com' \
--to=davidgow@google.com \
--cc=brendanhiggins@google.com \
--cc=dlatypov@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).