Skip to content

Commit

Permalink
add test for example workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rachhouse committed Sep 17, 2024
1 parent 1a4119f commit ca1f7f5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ Run the following GX Core workflow.
| 2024-05-01 | True | 4 |
| 2024-05-02 | True | 5 |
| 2024-05-03 | True | 5 |
| 2024-05-04 | True | 6 |
| 2024-05-04 | False | 6 |
| 2024-05-05 | True | 5 |
| 2024-05-06 | True | 6 |
| 2024-05-06 | False | 6 |
| 2024-05-07 | True | 5 |

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,22 @@

pd.DataFrame(validation_results_by_day)
# </snippet>

df = pd.DataFrame(validation_results_by_day)

# Check output matches what is in the docs.
expected_values = [
[ "2024-05-01", True, 4 ],
[ "2024-05-02", True, 5 ],
[ "2024-05-03", True, 5 ],
[ "2024-05-04", False, 6 ],
[ "2024-05-05", True, 5 ],
[ "2024-05-06", False, 6 ],
[ "2024-05-07", True, 5 ]
]

for idx, row in enumerate(expected_values):
results = df.iloc[idx]
assert str(results["date"]) == row[0]
assert results["expectation passed"] is row[1]
assert results["observed rows"] == row[2]

0 comments on commit ca1f7f5

Please sign in to comment.