From: Daniel Latypov <dlatypov@google.com>
To: brendanhiggins@google.com, davidgow@google.com
Cc: rmoar@google.com, linux-kernel@vger.kernel.org,
kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org,
skhan@linuxfoundation.org, Daniel Latypov <dlatypov@google.com>
Subject: [PATCH 3/3] kunit: tool: remove redundant file.close() call in unit test
Date: Wed, 2 Nov 2022 09:40:05 -0700 [thread overview]
Message-ID: <20221102164005.2516646-3-dlatypov@google.com> (raw)
In-Reply-To: <20221102164005.2516646-1-dlatypov@google.com>
We're using a `with` block above, so the file object is already closed.
Signed-off-by: Daniel Latypov <dlatypov@google.com>
---
tools/testing/kunit/kunit_tool_test.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py
index 0063773c0fc4..c41567eaf3c3 100755
--- a/tools/testing/kunit/kunit_tool_test.py
+++ b/tools/testing/kunit/kunit_tool_test.py
@@ -239,8 +239,6 @@ class KUnitParserTest(unittest.TestCase):
self.assertEqual(
"example",
result.subtests[1].name)
- file.close()
-
def test_ignores_prefix_printk_time(self):
prefix_log = test_data_path('test_config_printk_time.log')
--
2.38.1.273.g43a17bfeac-goog
next prev parent reply other threads:[~2022-11-02 16:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 16:40 [PATCH 1/3] kunit: tool: make TestCounts a dataclass Daniel Latypov
2022-11-02 16:40 ` [PATCH 2/3] kunit: tool: unit tests all check parser errors, standardize formatting a bit Daniel Latypov
2022-11-03 6:38 ` David Gow
2022-11-03 17:45 ` Daniel Latypov
2022-11-02 16:40 ` Daniel Latypov [this message]
2022-11-03 6:41 ` [PATCH 3/3] kunit: tool: remove redundant file.close() call in unit test David Gow
2022-11-03 6:37 ` [PATCH 1/3] kunit: tool: make TestCounts a dataclass David Gow
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=20221102164005.2516646-3-dlatypov@google.com \
--to=dlatypov@google.com \
--cc=brendanhiggins@google.com \
--cc=davidgow@google.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=rmoar@google.com \
--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
all inboxes | Powered by JetHome®