Skip to content

Commit 6f91093

Browse files
committed
test(chroma0): Add unittests.
1 parent 29dda21 commit 6f91093

File tree

2 files changed

+457
-3
lines changed

2 files changed

+457
-3
lines changed

src/vectorcode/database/chroma0.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def _try_server(base_url: str):
9393
return False
9494

9595

96-
async def _wait_for_server(base_url: str, timeout: int = 10):
96+
async def _wait_for_server(base_url: str, timeout: int = 10): # pragma: nocover
9797
# Poll the server until it's ready or timeout is reached
9898

9999
start_time = asyncio.get_event_loop().time()
@@ -169,7 +169,7 @@ def __new__(cls) -> "_Chroma0ClientManager":
169169

170170
return cls.singleton
171171

172-
def _atexit(self):
172+
def _atexit(self): # pragma: nocover
173173
try:
174174
loop = asyncio.get_running_loop()
175175
except RuntimeError:
@@ -249,7 +249,7 @@ async def _create_client(self, configs: Config) -> AsyncClientAPI:
249249
port=int(settings_obj.chroma_server_http_port or 8000),
250250
)
251251

252-
def clear(self):
252+
def clear(self): # pragma: nocover
253253
self.__clients.clear()
254254

255255

0 commit comments

Comments
 (0)