Skip to content

Commit

Permalink
tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenwacker committed Jul 12, 2024
1 parent 99d3c86 commit 6585eec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
6 changes: 3 additions & 3 deletions images/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/test__targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def test__diff_targets():
targets2 = targets1.copy()

new_value = 10.23434
selected_ndx = 1
selected_ndx = 0
targets2.loc[selected_ndx, "rt_max"] = new_value

result = diff_targets(targets1, targets2)
Expand Down
15 changes: 14 additions & 1 deletion tests/test__tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,20 @@ def test__df_diff():
{"A": [1, 0, 0, 2, 3], "B": [0, 0, 1, 2, 3], "_merge": _merge}
)

assert result.equals(expected), result.values == expected.values
print('DataFrame 1:')
print(df1)
print('Dataframe 2:')
print(df2)
print('Expected:')
print(expected)
print('Actual result:')
print(result)

# Sorting the results before comparison
sorted_result = result.sort_values(by=result.columns.tolist()).reset_index(drop=True)
sorted_expected = expected.sort_values(by=expected.columns.tolist()).reset_index(drop=True)

assert sorted_result.equals(sorted_expected), sorted_result.values == sorted_expected.values


def test__is_ms_file():
Expand Down

0 comments on commit 6585eec

Please sign in to comment.