Skip to content

Commit

Permalink
one more serialization test
Browse files Browse the repository at this point in the history
  • Loading branch information
rreinold committed Sep 19, 2024
1 parent f0f1e5e commit e02aca9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/expectations/core/test_expectation_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ExpectColumnValuesToNotBeNull,
UnexpectedRowsExpectation,
)
from great_expectations.expectations.window import Offset, Window


@pytest.mark.unit
Expand Down Expand Up @@ -49,6 +50,28 @@
"my_table WHERE data='bad'\"}"
),
),
(
ExpectColumnValuesToNotBeNull(
column="test_column",
mostly=0.82,
windows=[
Window(
constraint_fn="a",
parameter_name="b",
range=5,
offset=Offset(positive=0.2, negative=0.2),
)
],
),
(
'{"id": null, "meta": null, "notes": null, "result_format": "BASIC", '
'"description": null, "catch_exceptions": true, "rendered_content": null, '
'"windows": [{"constraint_fn": "a", "parameter_name": "b", "range": 5, '
'"offset": {"positive": 0.2, "negative": 0.2}}], "batch_id": null, '
'"row_condition": null, "condition_parser": null, "column": "test_column", '
'"mostly": 0.82}'
),
),
],
)
def test_expectation_serialization_snapshot(expectation, expected_serialization):
Expand Down

0 comments on commit e02aca9

Please sign in to comment.