[v2,3/3] kunit: tool: remove redundant file.close() call in unit test

Message ID 20221103174740.3492603-3-dlatypov@google.com
State New
Headers
Series [v2,1/3] kunit: tool: make TestCounts a dataclass |

Commit Message

Daniel Latypov Nov. 3, 2022, 5:47 p.m. UTC
  We're using a `with` block above, so the file object is already closed.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
---
v1 -> v2: just rebased onto linux-kselftest/kunit
---
 tools/testing/kunit/kunit_tool_test.py | 2 --
 1 file changed, 2 deletions(-)
  

Patch

diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py
index 5e3429a1202b..90c65b072be9 100755
--- a/tools/testing/kunit/kunit_tool_test.py
+++ b/tools/testing/kunit/kunit_tool_test.py
@@ -242,8 +242,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')