Import Statement
@boolean_test
Tests that return a boolean (True/False) result.Signature
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | str | Yes | - | Test name |
severity | str | No | "ERROR" | Test severity: "ERROR" or "WARNING" |
description | str | No | None | Test description |
column_name | str | No | None | Column being tested (for column-level tests) |
tags | list[str] | No | None | List of tags |
owners | list[str] | No | None | List of owners |
metadata | dict | No | None | Additional metadata |
quality_dimension | QualityDimension | No | None | Quality dimension (defaults to VALIDITY if column_name is set) |
skip | bool | No | False | Whether to skip this test |
Example
@expected_range
Tests that return a numeric value that should fall within a range.Signature
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | str | Yes | - | Test name |
min | float | No | None | Minimum expected value (inclusive) |
max | float | No | None | Maximum expected value (inclusive) |
severity | str | No | "ERROR" | Test severity |
description | str | No | None | Test description |
column_name | str | No | None | Column being tested |
tags, owners, metadata, quality_dimension, skip | - | No | - | Same as @boolean_test |
Example
@expected_values
Tests that return a value that should match one of a list of expected values.Signature
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | str | Yes | - | Test name |
expected | Any | list[Any] | Yes | - | Expected value(s) - can be single value or list |
allow_none | bool | No | False | Whether to allow None values |
severity | str | No | "ERROR" | Test severity |
description | str | No | None | Test description |
column_name | str | No | None | Column being tested |
tags, owners, metadata, quality_dimension, skip | - | No | - | Same as @boolean_test |
Example
@row_count
Tests that return a Sized object (DataFrame, list, etc.) to check row count.Signature
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | str | Yes | - | Test name |
min | int | No | None | Minimum expected row count (inclusive) |
max | int | No | None | Maximum expected row count (inclusive) |
severity | str | No | "ERROR" | Test severity |
description | str | No | None | Test description |
tags, owners, metadata, skip | - | No | - | Same as @boolean_test |
Example
Common Parameters
All decorators support these common parameters:name(required): Unique test nameseverity:"ERROR"or"WARNING"(default:"ERROR")description: Human-readable test descriptiontags: List of tags for categorizationowners: List of owner emails/usernamesmetadata: Dictionary of additional metadataskip: Boolean to skip the test
Return Types
@boolean_test: Must returnbool@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)
Related Documentation
- Quickstart - Get started with test decorators
- Sending Data - Learn how to send test results
- Best Practices - Best practices for using the SDK

