mirror of
https://github.com/obra/superpowers.git
synced 2026-05-10 11:09:05 +08:00
evals: use pre-commit hooks
This commit is contained in:
@@ -64,11 +64,12 @@ class TestCompareCommand:
|
||||
def test_set_superpowers_root_default_when_unset(monkeypatch, tmp_path):
|
||||
"""When SUPERPOWERS_ROOT is unset, helper sets it to PROJECT_ROOT.parent."""
|
||||
monkeypatch.delenv("SUPERPOWERS_ROOT", raising=False)
|
||||
from drill.cli import _set_superpowers_root_default, PROJECT_ROOT
|
||||
from drill.cli import PROJECT_ROOT, _set_superpowers_root_default
|
||||
|
||||
_set_superpowers_root_default()
|
||||
|
||||
import os
|
||||
|
||||
assert os.environ["SUPERPOWERS_ROOT"] == str(PROJECT_ROOT.parent)
|
||||
|
||||
|
||||
@@ -80,4 +81,5 @@ def test_set_superpowers_root_default_respects_existing(monkeypatch):
|
||||
_set_superpowers_root_default()
|
||||
|
||||
import os
|
||||
|
||||
assert os.environ["SUPERPOWERS_ROOT"] == "/custom/path"
|
||||
|
||||
@@ -6,6 +6,7 @@ import pytest
|
||||
|
||||
from drill.setup import clone_template, run_assertions
|
||||
from setup_helpers.base import create_base_repo
|
||||
from setup_helpers.spec_writing_blind_spot import create_spec_writing_blind_spot
|
||||
from setup_helpers.worktree import (
|
||||
add_worktree,
|
||||
create_caller_consent_plan,
|
||||
@@ -13,7 +14,6 @@ from setup_helpers.worktree import (
|
||||
link_gemini_extension,
|
||||
symlink_superpowers,
|
||||
)
|
||||
from setup_helpers.spec_writing_blind_spot import create_spec_writing_blind_spot
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -142,13 +142,17 @@ class TestSpecWritingBlindSpot:
|
||||
|
||||
result = subprocess.run(
|
||||
["git", "branch", "--show-current"],
|
||||
cwd=workdir, capture_output=True, text=True,
|
||||
cwd=workdir,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.stdout.strip() == "main"
|
||||
|
||||
result = subprocess.run(
|
||||
["git", "log", "--oneline"],
|
||||
cwd=workdir, capture_output=True, text=True,
|
||||
cwd=workdir,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.stdout.count("\n") >= 3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user