Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pytest Processor

Purpose

Runs Python test files using pytest to verify they pass.

How It Works

Python test files (.py) in the tests/ directory are run using pytest. Each test file is checked individually — a failing test causes the build to fail.

Source Files

  • Input: tests/**/*.py
  • Output: none (checker — pass/fail only)

Configuration

[processor.pytest]
src_extensions = [".py"]                      # File extensions to process (default: [".py"])
src_dirs = ["tests"]                     # Directories to scan (default: ["tests"])
dep_inputs = []                         # Additional files that trigger rebuilds
KeyTypeDefaultDescription
src_extensionsstring[][".py"]File extensions to discover
src_dirsstring[]["tests"]Directories to scan for test files
dep_inputsstring[][]Extra files whose changes trigger rebuilds

Batch support

The tool accepts multiple files on the command line. When batching is enabled (default), rsconstruct passes all files in a single invocation for better performance.