Explorar o código

Fix resource leak in test_client by clearing instance variables

Jelmer Vernooij hai 3 semanas
pai
achega
76543093bd
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      tests/compat/test_client.py

+ 3 - 0
tests/compat/test_client.py

@@ -69,6 +69,9 @@ class DulwichClientTestBase:
 
     def tearDown(self) -> None:
         rmtree_ro(self.gitroot)
+        # Clear instance variables to break reference cycles
+        self.gitroot = None
+        self.dest = None
 
     def assertDestEqualsSrc(self) -> None:
         repo_dir = os.path.join(self.gitroot, "server_new.export")