瀏覽代碼

Fix PackBasedObjectStore resource leak in tearDown

Jelmer Vernooij 1 月之前
父節點
當前提交
186828c1ad
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      dulwich/tests/test_object_store.py

+ 1 - 2
dulwich/tests/test_object_store.py

@@ -329,8 +329,7 @@ class PackBasedObjectStoreTests(ObjectStoreTests):
 
     def tearDown(self) -> None:
         """Clean up by closing all packs."""
-        for pack in self.store.packs:
-            pack.close()
+        self.store.close()
 
     def test_empty_packs(self) -> None:
         """Test that new store has no packs."""