write-tests

Creates PyTorch data loaders and evaluates them for efficiency and correctness.

2.1k|72|Updated Aug 17, 2017
One-click install
npx skills add https://github.com/JamieMason/syncpack --skill write-tests-jamiemason
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-tests
Source: https://github.com/JamieMason/syncpack/tree/main/skills/write-tests
Command: npx skills add https://github.com/JamieMason/syncpack --skill write-tests-jamiemason

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing tests for complex features can be error-prone and repetitive; this Skill provides a structured approach using the TestBuilder to ensure consistent, maintainable tests.

Core Features & Use Cases

  • Always use TestBuilder to avoid manually constructing Context in tests.
  • Fluent API for building test scenarios (packages, version groups, configuration) and asserting outcomes with built-in expect utilities.
  • Clear test organization guidance, integration patterns, and reusable patterns for visit_packages-based workflows.

Quick Start

Run a TestBuilder-based scenario to build test data and call build_and_visit_packages to execute validations.

Frequently Asked Questions about write-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write deterministic integration tests for Rust commands and validation logic?

To write deterministic integration tests for Rust commands and validation logic, use the TestBuilder pattern to build test data, configure packages, and assert outcomes with built-in expect utilities, avoiding manual Context construction.

What is the TestBuilder pattern for integration tests?

The TestBuilder pattern is a structured approach providing a fluent API to build test scenarios, configure packages and version groups, and execute validations through build_and_visit_packages workflows with reusable expectations.

How do I configure packages and semver rules in Rust test scenarios?

Configure packages and semver rules in Rust test scenarios by using the TestBuilder fluent API to set up package configurations, version groups, and semver rule constraints before executing validation logic and asserting outcomes.

Does the TestBuilder pattern support visit_packages-based workflows for testing new functionality?

Yes, the TestBuilder pattern supports visit_packages-based workflows for testing new functionality by providing reusable patterns and clear organization guidance to execute build_and_visit_packages workflows with consistent validation.

Why should I use TestBuilder instead of manually constructing Context in tests?

You should use TestBuilder instead of manually constructing Context in tests because manual construction is error-prone and repetitive. TestBuilder enforces a structured approach with a fluent API to ensure consistent, maintainable test scenarios.