Skip to content

Commit

Permalink
unit test update
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Jul 15, 2020
1 parent 00c5310 commit d35d6c0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_df2onehot.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_df2onehot():
df = import_example()

# TEST 3:
out = df2onehot(df, perc_min_num=0.8)
out = df2onehot(df, deep_extract=False, perc_min_num=0.8)
[uiy, ycounts] = np.unique(out['labx'], return_counts=True)
assert np.all(ycounts==np.array([148, 4, 891, 7, 3, 2, 7, 2, 681]))
# TEST 4:
Expand Down Expand Up @@ -54,7 +54,7 @@ def test_df2onehot():
df['lists'].iloc[890] = 1

# Run df2onehot
out = df2onehot(df)
out = df2onehot(df, deep_extract=True)
counts = out['numeric'][list(colnames)].sum(axis=1)
# Make some checks
for i in range(0,df.shape[0]):
Expand All @@ -74,7 +74,8 @@ def test_df2onehot():
df['lists'].iloc[890] = 1

# Run df2onehot
out = df2onehot(df)
del out
out = df2onehot(df, deep_extract=True)
counts = out['numeric'][list(colnames)].sum(axis=1)
# Make some checks
for i in range(0,df.shape[0]):
Expand Down

0 comments on commit d35d6c0

Please sign in to comment.