Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor stuff #4

Merged
merged 2 commits into from
Jul 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
7 changes: 3 additions & 4 deletions tests/test_stochatreat.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ def test_stochatreat_output_idx_col(treatments_dict):
data = treatments_dict["data"]
idx_col = treatments_dict["idx_col"]
assert treatments_df[idx_col].dtype == data[idx_col].dtype, "Index column is missing"


def test_stochatreat_output_size(treatments_dict):
"""Tests that the function's output is of the right length'"""
treatments_df = treatments_dict["treatments"]
size = treatments_dict["size"]
assert len(treatments_df) == size, "The size of the output does not match the sampled size"


def test_stochatreat_output_no_null_treats(treatments_dict):
"""Tests that the function's output treatments are all non null'"""
Expand Down Expand Up @@ -291,8 +291,7 @@ def test_stochatreat_block_ids(df, block_cols):
)

n_unique_blocks = len(df[block_cols].drop_duplicates())

n_unique_block_ids = len(treats["block_id"].drop_duplicates())

np.testing.assert_equal(n_unique_block_ids, n_unique_blocks)