Skip to content

Commit e9b4de0

Browse files
committed
Update test_conan_cmake.py
1 parent 37ee620 commit e9b4de0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/integration/examples/test_conan_cmake.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ def _publish_library_to_cache() -> None:
111111
library_source = examples_root / 'conan_cmake' / 'library'
112112
library_temp = Path('temp_library')
113113

114+
# Clean up any existing temp directory first
115+
if library_temp.exists():
116+
shutil.rmtree(library_temp)
117+
114118
# Copy library to temp location
115119
shutil.copytree(library_source, library_temp)
116120

@@ -130,6 +134,9 @@ def _publish_library_to_cache() -> None:
130134

131135
finally:
132136
os.chdir(original_cwd)
137+
# Clean up temp directory
138+
if library_temp.exists():
139+
shutil.rmtree(library_temp)
133140

134141
@staticmethod
135142
def test_library_consumer(example_runner: CliRunner) -> None:

0 commit comments

Comments
 (0)