mirror of
https://github.com/instructkr/claw-code.git
synced 2026-11-18 00:00:00 +08:00
test: ensure full candidate probing and clear cache in setUp
- Updates _check_bash_state to not short-circuit on the first unusable bash candidate on Windows, ensuring a working fallback is found if present. - Clears bash detection cache in unittest setUp/tearDown rather than just relying on a pytest fixture, covering native unittest runners.
This commit is contained in:
1 parent
86cf10a43a
commit
ad8cd12fa2
3 files changed
+24
-4
No files matched your search
@@ -14,7 +14,7 @@ REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
NEXT_ID = REPO_ROOT / 'scripts' / 'roadmap-next-id.sh'
|
||||
DOGFOOD_PROBE = REPO_ROOT / 'scripts' / 'dogfood-probe.py'
|
||||
|
||||
from tests._bash import get_bash_executable, require_bash, bash_skip_reason
|
||||
from tests._bash import get_bash_executable, require_bash, bash_skip_reason, _check_bash_state
|
||||
|
||||
|
||||
def run_next_id(roadmap: Path, script: Path = NEXT_ID) -> subprocess.CompletedProcess[str]:
|
||||
@@ -40,6 +40,14 @@ def run_dogfood_probe(args: list[str]) -> subprocess.CompletedProcess[str]:
|
||||
|
||||
|
||||
class RoadmapHelperTests(unittest.TestCase):
|
||||
def setUp(self) -> None:
|
||||
_check_bash_state.cache_clear()
|
||||
super().setUp()
|
||||
|
||||
def tearDown(self) -> None:
|
||||
_check_bash_state.cache_clear()
|
||||
super().tearDown()
|
||||
|
||||
@unittest.skipUnless(require_bash(), bash_skip_reason())
|
||||
def test_roadmap_next_id_prints_only_next_id_after_duplicate_check(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
|
||||
Reference in new issue
Block a user