lkml.org 
[lkml]   [2022]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 3/3] kunit: tool: remove redundant file.close() call in unit test
From
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
\
 
 \ /
  Last update: 2022-11-02 17:47    [W:0.141 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site