pytest-testing

Test data pipelines, Airflow DAGs, and BigQuery queries with Pytest.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/ilorozco11/agent-skill --skill pytest-testing-ilorozco11
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytest-testing
Source: https://github.com/ilorozco11/agent-skill/tree/main/.github/skills/pytest-testing
Command: npx skills add https://github.com/ilorozco11/agent-skill --skill pytest-testing-ilorozco11

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pytest testing patterns for data pipelines, Airflow DAGs, and BigQuery queries provide a structured approach to validate data processing logic, ensure DAG correctness, and enforce data quality in CI pipelines.

Core Features & Use Cases

  • Unit and integration tests for Airflow DAGs and BigQuery queries using Pytest.
  • Property-based testing with Hypothesis to explore edge cases and validate invariants.
  • Data contract validation using Pydantic and JSON Schema, plus snapshot and performance tests for data outputs.
  • Reusable fixtures and references to accelerate test setup and reuse across projects.

Quick Start

Install dependencies: pip install pytest hypothesis pydantic pytest-benchmark Run unit tests: pytest tests/unit Run integration tests (requires credentials): pytest -m integration

Frequently Asked Questions about pytest-testing

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

FAQPage Schema
How do I write Pytest tests for Airflow DAGs and BigQuery queries?

To write Pytest tests for Airflow DAGs and BigQuery queries, you use structured unit and integration test patterns with reusable fixtures to validate DAG correctness and query logic in CI pipelines.

What is property-based testing with Hypothesis for data pipelines?

Property-based testing with Hypothesis for data pipelines automatically generates diverse test cases to explore edge cases and validate invariants, ensuring your data processing logic handles unexpected inputs robustly.

How do I enforce data contracts in data pipelines using Pytest?

You enforce data contracts in data pipelines using Pytest by validating data outputs against Pydantic models and JSON schemas, ensuring data quality and structural consistency across pipeline runs.

Do I need Python tooling to run Pytest tests for data pipelines?

Yes, you need Python tooling to run Pytest tests for data pipelines. You must install dependencies like pytest, hypothesis, and pydantic, with integration tests requiring valid credentials to execute successfully.

Can I run snapshot and performance tests for data outputs with Pytest?

Yes, you can run snapshot and performance tests for data outputs with Pytest by installing pytest-benchmark, allowing you to capture output states and measure execution speed to prevent regressions.