Skip to main content
Complete reference for all test decorators available in the Elementary Python SDK.

Import Statement

@boolean_test

Tests that return a boolean (True/False) result.

Signature

Parameters

Example

@expected_range

Tests that return a numeric value that should fall within a range. They can also return a list of numeric values or a pandas Series.

Signature

Parameters

Example

@expected_values

Tests that return a value (or values) that should match one of a list of expected values.

Signature

Parameters

Example

@row_count

Tests that return a Sized object (DataFrame, list, etc.) to check row count.

Signature

Parameters

Example

Common Parameters

All decorators support these common parameters:
  • name (required): Unique test name
  • severity: "ERROR" or "WARNING" (default: "ERROR")
  • description: Human-readable test description
  • tags: List of tags for categorization
  • owners: List of owner emails/usernames
  • metadata: Dictionary of additional metadata
  • skip: Boolean to skip the test

Return Types

  • @boolean_test: Must return bool
  • @expected_range: Must return numeric value (int or float)
  • @expected_values: Can return any type that can be compared
  • @row_count: Must return a Sized object (has __len__ method)