원클릭으로
test-runner
Skill para ejecutar y gestionar tests. Incluye patrones de testing, fixtures comunes, y estrategias de debugging de tests fallidos.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Skill para ejecutar y gestionar tests. Incluye patrones de testing, fixtures comunes, y estrategias de debugging de tests fallidos.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Entrevista a un experto de dominio (SME) para extraer su conocimiento técnico tácito y sintetizarlo en una Skill reutilizable. Se activa PROACTIVAMENTE ante 3 situaciones: (1) Frustración — el usuario se queja de código, arquitectura o falta de estándares; (2) Ambigüedad sin Reglas — se pide un refactor profundo pero no hay estándares definidos; (3) Fricción — el usuario ha corregido 2+ veces decisiones de diseño en la misma sesión. USE FOR: extraer estándares, crear reglas de arquitectura, definir anti-patrones, capturar conocimiento tácito, generar prompts reutilizables, entrevistar experto, sintetizar conocimiento técnico, crear skills desde cero.
Entrevista a un experto de dominio (SME) para extraer su conocimiento técnico y sintetizarlo en una Skill Maestra Abstracta (prompt reutilizable). Se activa PROACTIVAMENTE ante 3 situaciones: (1) Frustración — el usuario se queja de código, arquitectura o falta de estándares (ej. "vaya desastre", "arregla este espagueti", "los logs están mal"); (2) Ambigüedad sin Reglas — se pide un refactor profundo o pieza core pero no hay estándares definidos en el contexto; (3) Fricción — el usuario ha corregido 2 o más veces decisiones de diseño/arquitectura/formato en la misma sesión. USE FOR: extraer estándares, crear reglas de arquitectura, definir anti-patrones, refactor sin criterios claros, capturar conocimiento tácito, generar prompts reutilizables, entrevistar experto, sintetizar conocimiento técnico.
Skill para mantener la calidad del código: linting, formatting, type checking. Garantiza que el código cumple con los estándares del proyecto.
Skill para mantener la documentación sincronizada con el código. Incluye patrones de documentación, ubicaciones estándar, y checklists.
Skill para manejar el flujo de trabajo de Git: changelog, commits, push, y releases. Automatiza el proceso de versionado y publicación.
Skill para desarrollar, mantener y extender el servidor MCP de Obsidian. Incluye patrones de código, arquitectura, testing y gestión de paquetes.
| name | Test Runner |
| description | Skill para ejecutar y gestionar tests. Incluye patrones de testing, fixtures comunes, y estrategias de debugging de tests fallidos. |
| tools | ["run_command","read","edit"] |
uv run pytest tests/
# Por archivo
uv run pytest tests/test_basic.py
# Por función
uv run pytest tests/test_basic.py::test_function_name
# Por clase
uv run pytest tests/test_basic.py::TestClassName
# Verbose - más detalle
uv run pytest tests/ -v
# Stop en primer fallo
uv run pytest tests/ -x
# Solo tests que fallaron antes
uv run pytest tests/ --lf
# Mostrar prints
uv run pytest tests/ -s
# Combinado: verbose, stop, prints
uv run pytest tests/ -vxs
Los tests están en tests/:
tests/
├── conftest.py # Fixtures compartidas
├── test_basic.py # Tests de herramientas básicas
├── test_security.py # Tests de seguridad/paths
├── test_agents.py # Tests de carga de skills
├── test_connection_logic.py # Tests de conexiones semánticas
└── test_image_indexing.py # Tests de indexación de imágenes
"""
Tests para {módulo}.
"""
import pytest
import anyio # Para tests async
from obsidian_mcp.module import function_to_test
class TestFunctionName:
"""Tests para function_to_test."""
def test_caso_normal(self) -> None:
"""Verifica comportamiento normal."""
result = function_to_test("input")
assert result == "expected"
def test_caso_error(self) -> None:
"""Verifica manejo de errores."""
with pytest.raises(ValueError):
function_to_test(None)
@pytest.mark.asyncio
async def test_async_function(self) -> None:
"""Verifica función asíncrona."""
result = await async_function()
assert result is not None
En conftest.py:
import pytest
from pathlib import Path
@pytest.fixture
def test_vault(tmp_path: Path) -> Path:
"""Crea un vault temporal para tests."""
vault = tmp_path / "test_vault"
vault.mkdir()
# Crear estructura básica
(vault / "note1.md").write_text("# Test Note")
return vault
@pytest.fixture
def sample_note(test_vault: Path) -> Path:
"""Crea una nota de ejemplo."""
note = test_vault / "sample.md"
note.write_text("---\ntags: [test]\n---\n# Sample")
return note
uv run pytest tests/test_failing.py -vvs
def test_something():
result = function()
breakpoint() # Pausa aquí
assert result == expected
Luego ejecutar:
uv run pytest tests/test_file.py -s
uv run pytest tests/ --tb=long
# Saltar test
@pytest.mark.skip(reason="Not implemented yet")
def test_future_feature():
...
# Saltar condicionalmente
@pytest.mark.skipif(condition, reason="...")
def test_conditional():
...
# Esperar fallo
@pytest.mark.xfail(reason="Known bug")
def test_known_issue():
...
Algunos tests necesitan configuración:
# Ejecutar con vault de prueba
OBSIDIAN_VAULT_PATH=/tmp/test_vault uv run pytest tests/
Antes de hacer push, ejecutar suite completa:
# Todos los tests deben pasar
uv run pytest tests/ -v
# Verificar que no hay warnings críticos
uv run pytest tests/ -W error
Para generar reporte HTML (si pytest-html está instalado):
uv run pytest tests/ --html=report.html