agentleFS
genlayerlabsgenlayerlabs/genlayer-studio/.claude/skills/unit-tests/SKILL.md

unit-tests

Skill180 starsChanged 8 months agoMITView on GitHub

Setup Python virtual environment and run unit tests with gltest

  • Deletes or force-pushes
  • Installs packages

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use auto-perf-optimize, chat-customizations-editor and 10 more.

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.
  • MicrosoftSkill

    auto-perf-optimize

    Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

    Also in 5 projects that use this

  • MicrosoftSkill

    chat-customizations-editor

    Use when working on the Chat Customizations editor — the management UI for agents, skills, instructions, hooks, prompts, MCP servers, and plugins.

    Also in 5 projects that use this

  • OpenCortexIDESkill

    add-policy

    Use when adding, modifying, or reviewing VS Code configuration policies. Covers the full policy lifecycle from registration to export to platform-specific artifacts. Run on ANY change that adds a `policy:` field to a configuration property.

    Also in 4 projects that use this

  • +9 more from microsoft

The file

Files
SKILL.md

Run Unit Tests

Setup the Python environment and run unit tests for GenLayer Studio.

Prerequisites

  • Python 3.12 installed
  • virtualenv installed (pip install virtualenv)

Setup Virtual Environment (first time or reset)

# Remove existing venv if present
rm -rf .venv

# Create new venv with Python 3.12
virtualenv -p python3.12 .venv

# Activate
source .venv/bin/activate

# Upgrade pip
pip install --upgrade pip

# Install all dependencies
pip install -r requirements.txt
pip install -r requirements.test.txt
pip install -r backend/requirements.txt

# Set Python path
export PYTHONPATH="$(pwd)"

Run Tests

# Activate venv (if not already)
source .venv/bin/activate
export PYTHONPATH="$(pwd)"

# Run all unit tests
gltest --contracts-dir . tests/unit

# Run specific test file
gltest --contracts-dir . tests/unit/test_specific.py

# Run with verbose output
gltest --contracts-dir . tests/unit -v

# Run specific test function
gltest --contracts-dir . tests/unit/test_file.py::test_function_name

Quick One-Liner (after initial setup)

source .venv/bin/activate && export PYTHONPATH="$(pwd)" && gltest --contracts-dir . tests/unit

Troubleshooting

Python 3.12 Not Found

# Check available Python versions
which python3.12

# On macOS with Homebrew
brew install python@3.12

gltest Command Not Found

# Make sure venv is activated
source .venv/bin/activate

# Reinstall test dependencies
pip install -r requirements.test.txt

Import Errors

# Ensure PYTHONPATH is set
export PYTHONPATH="$(pwd)"

# Verify from project root
pwd  # Should be genlayer-studio

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.