From e02aca9e02f6c33089ab014863910f6d16d61eb0 Mon Sep 17 00:00:00 2001 From: Robby Reinold Date: Thu, 19 Sep 2024 11:42:12 -0400 Subject: [PATCH] one more serialization test --- .../core/test_expectation_serialization.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/expectations/core/test_expectation_serialization.py b/tests/expectations/core/test_expectation_serialization.py index e278ca9271c0..e6f91c3d294e 100644 --- a/tests/expectations/core/test_expectation_serialization.py +++ b/tests/expectations/core/test_expectation_serialization.py @@ -5,6 +5,7 @@ ExpectColumnValuesToNotBeNull, UnexpectedRowsExpectation, ) +from great_expectations.expectations.window import Offset, Window @pytest.mark.unit @@ -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):