File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import logging
88import os
99import re
10- import shlex
1110import subprocess
1211import sys
1312from collections import defaultdict
Original file line number Diff line number Diff line change 66import os
77import time
88import threading
9- import subprocess
109import asyncio
1110from datetime import datetime
1211from pathlib import Path
Original file line number Diff line number Diff line change 77
88@pytest .mark .skipif (sys .platform != "win32" , reason = "Windows-specific compatibility test" )
99def test_caw_imports_without_posix_fcntl ():
10+ import importlib .util
11+
12+ if importlib .util .find_spec ("caw" ) is None :
13+ pytest .skip ("caw is not installed" )
1014 from codewiki .src .be .caw_compat import CawAgent , ToolGroup
1115
1216 assert CawAgent is not None
Original file line number Diff line number Diff line change @@ -133,7 +133,9 @@ def test_caw_complete_records_usage(monkeypatch):
133133
134134def test_caw_allowed_tools_names_each_mcp_tool (tmp_path ):
135135 import json
136+ import pytest
136137
138+ pytest .importorskip ("caw" )
137139 from codewiki .src .be .caw_backend import _with_allowed_tools
138140
139141 config_path = tmp_path / "mcp.json"
@@ -153,6 +155,9 @@ def test_caw_allowed_tools_names_each_mcp_tool(tmp_path):
153155
154156
155157def test_caw_module_agents_do_not_enable_native_writers ():
158+ import pytest
159+
160+ pytest .importorskip ("caw" )
156161 from codewiki .src .be .caw_backend import _agent_tool_group_for_provider
157162 from codewiki .src .be .caw_compat import ToolGroup
158163
@@ -162,6 +167,9 @@ def test_caw_module_agents_do_not_enable_native_writers():
162167
163168
164169def test_caw_module_agent_retries_when_page_is_missing (tmp_path ):
170+ import pytest
171+
172+ pytest .importorskip ("caw" )
165173 from codewiki .src .be .caw_backend import CawBackend
166174
167175 class FakeAgent :
@@ -199,6 +207,9 @@ def agent_factory():
199207
200208
201209def test_caw_module_agent_stops_when_mcp_writer_is_unavailable (tmp_path ):
210+ import pytest
211+
212+ pytest .importorskip ("caw" )
202213 from codewiki .src .be .caw_backend import CawBackend
203214
204215 agents = []
You can’t perform that action at this time.
0 commit comments