Last active
March 28, 2023 12:23
-
-
Save zdravko-il/31a37ba4b0ed18292f25074103ace65b to your computer and use it in GitHub Desktop.
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
def test_filter(session: Session): | |
source_data = [...] | |
schema = T.StructType(...) | |
source_df = session.create_dataframe(source_data, schema=schema) | |
actual_df = process.filter_personal_consumption_expenditures(source_df) | |
expected_data = [(2021, 115.53)] | |
expected_df = session.create_dataframe( | |
expected_data, | |
schema=T.StructType( | |
[ | |
T.StructField("Year", T.IntegerType(), nullable=True), | |
T.StructField("PCE", T.DoubleType(), nullable=True), | |
] | |
), | |
) | |
assert actual_df.collect() == expected_df.collect() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment