run-tests

Run tests for the wc_simd project using pytest. Use this skill to run all tests, specific test files, or individual test functions. Invoke with /run-tests.

📖 中文导读:Run tests for the wc_simd project using pytest. Use this skill to run all tests, specific test files, or individual test functions. Invoke with /run-tests. 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: run-tests description: Run tests for the wc_simd project using pytest. Use this skill to run all tests, specific test files, or individual test functions. Invoke with /run-tests.

Testing

This skill runs tests for the wc_simd project using pytest.

Run All Tests

pytest

Run Specific Test File

pytest tests/test_pyspark.py

Run Specific Test Function

pytest tests/test_pyspark.py::test_function_name

Run with Verbose Output

pytest -v

Run with Coverage

pytest --cov=wc_simd --cov-report=html

Run Only Failed Tests

pytest --lf

Run Tests Matching Pattern

pytest -k "embed"  # Run tests with "embed" in name

Test Files

File Description
tests/test_pyspark.py PySpark integration tests
tests/test_embed.py Embedding service tests
tests/test_llm.py LLM integration tests

Prerequisites

Ensure dependencies are installed:

uv sync

For Spark tests, ensure Docker Spark is running:

cd spark_docker_s3 && docker compose up -d --build

Debugging Tests

# Drop into debugger on failure
pytest --pdb

# Show print statements
pytest -s

# Show local variables on failure
pytest -l