Hi team, quick question: how to add this test case...
# questions
z
Hi team, quick question: how to add this test case ( I am not sure how to load the catalog in tests folder) e.g. I have defined a node
Copy code
node(func=create_class_code_list, inputs=["full_raw_data_dump", 'params:feature_engineering.primary_policy_key', 'params:feature_engineering.class_code_col'], outputs="full_data_with_agg_features")
I want to test the inputs 1.
full_raw_data_dump
is a dataframe from catalog.yaml. I want to test keys in this df. 2.
params:feature_engineering.primary_policy_key
is str from catalog.yaml. I want to test the string using a keyword pattern.
j
hi @Zhe An! in https://docs.kedro.org/en/stable/development/automated_testing.html#create-an-example-test you have an example of how to create a
KedroContext
fixture that then you can use to extract the catalog (it has a
.catalog
property)
does that help?