From 96cae0002efe5c108be4a3dad0ae2c42069f1ca6 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Tue, 12 Dec 2023 10:09:34 -0500 Subject: [PATCH] Extract remaining local "import gc" to module level In #1765, I missed one, somehow. This fixes that. --- test/test_diff.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test_diff.py b/test/test_diff.py index 1d138a086..87f92f5d1 100644 --- a/test/test_diff.py +++ b/test/test_diff.py @@ -3,6 +3,7 @@ # This module is part of GitPython and is released under the # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ +import gc import os import os.path as osp import shutil @@ -27,8 +28,6 @@ def setUp(self): self.submodule_dir = tempfile.mkdtemp() def tearDown(self): - import gc - gc.collect() shutil.rmtree(self.repo_dir) shutil.rmtree(self.submodule_dir)