Skip to content

Commit

Permalink
remove reset_index calls in asserts of test
Browse files Browse the repository at this point in the history
  • Loading branch information
jperez999 committed Jun 9, 2023
1 parent dcc59ba commit aa2dafc
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/unit/workflow/test_workflow_subgraphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,10 @@ def get_norms(tar):
gdf = np.log(gdf + 1)
return gdf

# Check mean and std - No good right now we have to add all other changes; Clip, Log

concat_ops = "_FillMissing_1_LogOp_1"
if replace:
concat_ops = ""

# Write to new "shuffled" and "processed" dataset
df_pp = workflow.transform(dataset).to_ddf().compute()

if engine == "parquet":
Expand All @@ -93,11 +90,10 @@ def get_norms(tar):
workflow.get_subworkflow("not_exist")
assert "No subgraph named" in str(exc.value)

# test transform results from subgraph
sub_cat_df = subgraph_cat.transform(dataset).to_ddf().compute()
assert assert_eq(sub_cat_df.reset_index(drop=True), df_pp[cat_names].reset_index(drop=True))
assert_eq(sub_cat_df, df_pp[cat_names])

cont_names = [name + concat_ops for name in cont_names]
sub_cont_df = subgraph_cont.transform(dataset).to_ddf().compute()
assert assert_eq(
sub_cont_df[cont_names].reset_index(drop=True), df_pp[cont_names].reset_index(drop=True)
)
assert_eq(sub_cont_df[cont_names], df_pp[cont_names])

0 comments on commit aa2dafc

Please sign in to comment.