Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions python/e2e/testharness/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,18 @@ async def configure_for_test(self, test_file: str, test_name: str):
await self._proxy.configure(abs_snapshot_path, self.work_dir)

# Clear temp directories between tests (but leave them in place)
# Use ignore_errors=True to handle race conditions where files may still
# be written by background processes during cleanup
for item in Path(self.home_dir).iterdir():
if item.is_dir():
shutil.rmtree(item)
shutil.rmtree(item, ignore_errors=True)
else:
item.unlink()
item.unlink(missing_ok=True)
for item in Path(self.work_dir).iterdir():
if item.is_dir():
shutil.rmtree(item)
shutil.rmtree(item, ignore_errors=True)
else:
item.unlink()
item.unlink(missing_ok=True)

def get_env(self) -> dict:
"""Return environment variables configured for isolated testing."""
Expand Down
1 change: 1 addition & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dev = [
"ty>=0.0.2",
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-timeout>=2.0.0",
"httpx>=0.24.0",
]

Expand Down
17 changes: 16 additions & 1 deletion python/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.