Ver Fonte

Fix PackBasedObjectStore resource leak in tearDown

Jelmer Vernooij há 3 semanas atrás
pai
commit
42de06a40c
1 ficheiros alterados com 1 adições e 2 exclusões
  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."""