Skip to content

Commit 587844e

Browse files
committed
refactor(test): improve assertion readability in test_restating_models
- Simplified assertion statements in the test_restating_models function for better clarity. - Enhanced readability by formatting assertions with inline messages. - Maintained existing test logic and functionality.
1 parent a7c0086 commit 587844e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

dagster_sqlmesh/test_sqlmesh_context.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import logging
22

33
import polars
4+
45
from .conftest import SQLMeshTestContext
56

67
logger = logging.getLogger(__name__)
@@ -183,12 +184,12 @@ def test_restating_models(sample_sqlmesh_test_context: SQLMeshTestContext):
183184
"""
184185
)
185186

186-
assert (
187-
feb_sum_query_restate[0][0] == feb_sum_query[0][0]
188-
), "February sum should not change"
189-
assert (
190-
march_sum_query_restate[0][0] != march_sum_query[0][0]
191-
), "March sum should change"
192-
assert (
193-
intermediate_2_query_restate[0][0] == intermediate_2_query[0][0]
194-
), "Intermediate model should not change during restate"
187+
assert feb_sum_query_restate[0][0] == feb_sum_query[0][0], (
188+
"February sum should not change"
189+
)
190+
assert march_sum_query_restate[0][0] != march_sum_query[0][0], (
191+
"March sum should change"
192+
)
193+
assert intermediate_2_query_restate[0][0] == intermediate_2_query[0][0], (
194+
"Intermediate model should not change during restate"
195+
)

0 commit comments

Comments
 (0)