소스 검색

Fix PackBasedObjectStore resource leak in tearDown

Jelmer Vernooij 4 주 전
부모
커밋
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."""