Skip to content

Commit

Permalink
wip. fix pandas testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyama341 committed Sep 20, 2024
1 parent d76e08c commit 2cb7707
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/test_guideRNAcas3_9_12.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,9 @@ def test_extract_sgRNAs_cas3_basic(sgrna_args_cas3, expected_cas3_sgrna_df):
assert sgrna_df['off_target_count'].is_monotonic_increasing, "The DataFrame should be sorted by off-target counts in ascending order"

# Compare with the expected DataFrame loaded from CSV
pd.testing.assert_frame_equal(
sgrna_df.reset_index(drop=True),
expected_sgrna_df.reset_index(drop=True),
atol=1e-5
)
pd.testing.assert_frame_equal(sgrna_df.reset_index(drop=True), expected_cas3_sgrna_df.reset_index(drop=True),
check_like=True,
atol=1e-5)

print(sgrna_df)
print(expected_cas3_sgrna_df)
Expand Down Expand Up @@ -426,11 +424,9 @@ def test_extract_sgRNAs_output_cas3(sgrna_args_cas3, expected_cas3_sgrna_df):
assert len(sgrna_df) == len(expected_cas3_sgrna_df), f"The number of rows ({len(sgrna_df)}) does not match the expected ({len(expected_cas3_sgrna_df)})"

# Check that the DataFrame content matches the expected content
pd.testing.assert_frame_equal(
sgrna_df.reset_index(drop=True),
expected_sgrna_df.reset_index(drop=True),
atol=1e-5
)
pd.testing.assert_frame_equal(sgrna_df.reset_index(drop=True), expected_cas3_sgrna_df.reset_index(drop=True),
atol=1e-5)

print(sgrna_df)
print(expected_cas3_sgrna_df)

Expand Down

0 comments on commit 2cb7707

Please sign in to comment.