run-tests
Skill584 starsChanged 10 months agoMITView on GitHub
Guide for running pytest tests locally. Use this when running tests to verify code changes.
- Installs packages
17 other projects use a version of this.
Adopted by
Most recently taken up by
- vercel/next.jstheir own version, first seen Nov 29, 2026
- Dipeshpal/capestheir own version, first seen Sep 27, 2026
- nowsprinting/unity-coding-skillstheir own version, first seen Sep 22, 2026
- overmind-core/overmindtheir own version, first seen Sep 15, 2026
- dylanroscover/Embodytheir own version, first seen Sep 5, 2026
- Amplicode/spring-skillstheir own version, first seen Sep 2, 2026
Used with
Projects with it also use code-review.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 4 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- vercel/next.js★ 144ksame name
- microsoft/testfx★ 1ksame name
- overmind-core/overmind★ 376same name
- dylanroscover/Embody★ 185same name
- Amplicode/spring-skills★ 126same name
- hoangsonww/AI-Agents-Orchestrator★ 87same name
- lorenliu13/claude-code-for-hydrology★ 67same name
- gabriel-dehan/claude_hooks★ 41same name
- nowsprinting/unity-coding-skills★ 20same name
- VincentH-Net/dotnet-agentic-engineering★ 9same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-functionSkill
- build-docsSkill
- code-styleSkill
- dax-optimizationSkill
- direct-lake-operationsSkill
- github-repo-exploreSkill
- planning-with-filesSkill
- pr-review-commentsSkill
- query-builder-daxSkill
- rest-api-patternsSkill
- sql_to_daxSkill
- tom-operationsSkill
- ui-stylingSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when you need to:
- Distinctive: line 13
Run unit tests to verify code changes
- Distinctive: line 14
Run specific tests by name
- Very specific: line 41
Create conda environment from environment.yml:
- Distinctive: line 225
Before committing code changes:
- Distinctive: line 244
If tests fail with import errors:
- Distinctive: line 253
If tests fail with missing package:
- Distinctive: line 262
If tests behave unexpectedly:
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Running Tests
This skill covers running pytest tests for the Semantic Link Labs project.
When to Use This Skill
Use this skill when you need to:
- Run unit tests to verify code changes
- Run specific tests by name
- Debug failing tests
- Validate changes before committing
Test Framework
| Component | Details |
| Framework | pytest |
| Location | tests/ directory |
| Configuration | pyproject.toml |
Prerequisites
Install Development Dependencies
# Install package in editable mode with test dependencies
pip install -e ".[test]"Environment Setup
Create conda environment from environment.yml:
conda env create -f environment.yml
conda activate fabric
pip install -e .Running Tests
Basic Commands
# Run all tests
pytest -s tests/
# Run with verbose output
pytest -sv tests/
# Run specific test file
pytest -s tests/test_example.py
# Run specific test by name pattern
pytest -s tests/ -k test_my_function
# Run multiple tests by pattern
pytest -s tests/ -k "test_list or test_create"
# Stop on first failure
pytest -sx tests/Test Discovery
pytest automatically discovers tests in:
- Files named
test_*.pyor*_test.py - Functions named
test_* - Classes named
Test*
Test Output Options
Verbose Output
# Show test names and results
pytest -v tests/
# Show test names with print statements
pytest -sv tests/Show Print Statements
The -s flag captures stdout:
# Show print output during tests
pytest -s tests/Show Test Durations
# Show slowest 10 tests
pytest --durations=10 tests/Filtering Tests
By Test Name
# Run tests matching pattern
pytest -k "workspace" tests/
# Run tests NOT matching pattern
pytest -k "not slow" tests/
# Combine patterns
pytest -k "workspace and not admin" tests/By File
# Run specific test file
pytest tests/test_workspaces.py
# Run tests in directory
pytest tests/admin/Debugging Failed Tests
Stop on First Failure
pytest -x tests/Enter Debugger on Failure
pytest --pdb tests/Show Local Variables on Failure
pytest -l tests/Increase Verbosity
pytest -vvv tests/Test Structure
Basic Test Example
import pytest
import pandas as pd
def test_my_function_returns_dataframe():
"""Test that my_function returns a DataFrame."""
from sempy_labs import my_function
result = my_function()
assert isinstance(result, pd.DataFrame)
def test_my_function_with_parameter():
"""Test my_function with specific parameter."""
from sempy_labs import my_function
result = my_function(workspace="Test Workspace")
assert not result.empty
assert "Name" in result.columnsTest with Expected Exception
def test_my_function_raises_on_invalid_input():
"""Test that my_function raises ValueError on invalid input."""
from sempy_labs import my_function
with pytest.raises(ValueError, match="Invalid"):
my_function(invalid_param="bad value")CI/CD Integration
The project uses GitHub Actions for CI. See .github/workflows/build.yaml:
- name: Test with pytest
shell: bash -el {0}
run: |
pytest -s tests/Pre-Commit Test Checklist
Before committing code changes:
# Run all tests
pytest -s tests/
# Run tests for modified area
pytest -s tests/ -k relevant_test_pattern
# Check for any failures
# If failures, fix code and re-runCommon Test Issues
Import Errors
If tests fail with import errors:
# Ensure package is installed in editable mode
pip install -e .Missing Dependencies
If tests fail with missing package:
# Install test dependencies
pip install -e ".[test]"Environment Issues
If tests behave unexpectedly:
# Recreate conda environment
conda env remove -n fabric
conda env create -f environment.yml
conda activate fabric
pip install -e .Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

