-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
/* PR_START p--misc-improvements 03 */ Add snapshot expectation descr…
…iption.
- Loading branch information
Showing
5 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
19 changes: 19 additions & 0 deletions
19
metricflow-semantics/tests_metricflow_semantics/snapshot/test_snapshot.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from __future__ import annotations | ||
|
||
from _pytest.fixtures import FixtureRequest | ||
from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration | ||
from metricflow_semantics.test_helpers.snapshot_helpers import assert_str_snapshot_equal | ||
|
||
|
||
def test_expectation_description( | ||
request: FixtureRequest, | ||
mf_test_configuration: MetricFlowTestConfiguration, | ||
) -> None: | ||
"""Tests having a description of the expectation in a snapshot.""" | ||
assert_str_snapshot_equal( | ||
request=request, | ||
mf_test_configuration=mf_test_configuration, | ||
snapshot_id="result", | ||
snapshot_str="1 + 1 = 2", | ||
expectation_description="The snapshot should show the 2 as the result.", | ||
) |
8 changes: 8 additions & 0 deletions
8
...ricflow_semantics/snapshots/test_snapshot.py/str/test_expectation_description__result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
test_name: test_expectation_description | ||
test_filename: test_snapshot.py | ||
docstring: | ||
Tests having a description of the expectation in a snapshot. | ||
expectation_description: | ||
The snapshot should show the 2 as the result. | ||
|
||
1 + 1 = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters