Skip to content

Commit ba5c900

Browse files
authored
Clear directory after test (#169)
# Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed - [ ] I have read and agree to the [Contributor License Agreement](../CLA.md)
1 parent c264606 commit ba5c900

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/unit/codegen/cli/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import shutil
23
import subprocess
34
from pathlib import Path
45

@@ -30,4 +31,5 @@ def initialized_repo(sample_repository: Path, runner: CliRunner):
3031
runner.invoke(init_command)
3132
subprocess.run(["git", "add", "."], cwd=sample_repository, check=True)
3233
subprocess.run(["git", "commit", "-m", "Initialize codegen"], cwd=sample_repository, check=True)
33-
return sample_repository
34+
yield sample_repository
35+
shutil.rmtree(sample_repository)

0 commit comments

Comments
 (0)