Browse Source

RepositoryTestCaseBase: call __exit__

As we call __enter__ in setUp,
let's call __exit__ in tearDown.
Thomas Waldmann 2 years ago
parent
commit
f0e4be76b1
1 changed files with 1 additions and 1 deletions
  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):