Skip to content

Commit

Permalink
cleanup inside GitTemporaryDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gauthier committed Nov 2, 2023
1 parent 6b3342a commit 997d7a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ def __exit__(self, exc_type, exc_val, exc_tb):
class GitTemporaryDirectory(ChdirTemporaryDirectory):
def __enter__(self):
res = super().__enter__()
make_repo()
self.repo = make_repo()
return res

def __exit__(self, exc_type, exc_val, exc_tb):
del self.repo
super().__exit__(exc_type, exc_val, exc_tb)


def make_repo(path=None):
if not path:
Expand Down

0 comments on commit 997d7a9

Please sign in to comment.