소스 검색

RepositoryTestCaseBase: call __exit__

As we call __enter__ in setUp,
let's call __exit__ in tearDown.
Thomas Waldmann 2 년 전
부모
커밋
f0e4be76b1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/borg/testsuite/repository.py

+ 1 - 1
src/borg/testsuite/repository.py

@@ -61,7 +61,7 @@ class RepositoryTestCaseBase(BaseTestCase):
         self.repository.__enter__()
 
     def tearDown(self):
-        self.repository.close()
+        self.repository.__exit__(None, None, None)
         shutil.rmtree(self.tmppath)
 
     def reopen(self, exclusive=UNSPECIFIED):