Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Commit

Permalink
further tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinL committed Jun 3, 2020
1 parent 7f18046 commit c77f1e4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_fix_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,13 @@ def test_fix_2(spark):

df_expected = pd.DataFrame(df_expected)

pd.testing.assert_frame_equal(df_result,df_expected)
pd.testing.assert_frame_equal(df_result,df_expected)

# Check col not dropped if names are the same
df = spark.createDataFrame(Row(**x) for x in data_list)
df = remove_leading_zeros(df, "id_var", "id_var")
df_expected = df_expected.rename(columns={"id_var_norm": "id_var"})


df_result = df.toPandas()
pd.testing.assert_frame_equal(df_result,df_expected)

0 comments on commit c77f1e4

Please sign in to comment.